re PR c/69973 (ICE on excessive attribute vector_size)

PR c/69973
	* targhooks.c (default_vector_alignment): Limit to MAX_OFILE_ALIGNMENT.

	PR c/69973
	* gcc.dg/pr69973.c: New test.

From-SVN: r234002
This commit is contained in:
Bernd Schmidt 2016-03-04 22:36:42 -07:00 committed by Jeff Law
parent 201d49e91f
commit b6b552fd01
4 changed files with 12 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
PR c/69973
* targhooks.c (default_vector_alignment): Limit to MAX_OFILE_ALIGNMENT.
PR rtl-optimization/69941
* postreload.c (reload_combine_recognize_pattern): Ensure all uses of
the reg share its mode.

View file

@ -1031,7 +1031,10 @@ tree default_mangle_decl_assembler_name (tree decl ATTRIBUTE_UNUSED,
HOST_WIDE_INT
default_vector_alignment (const_tree type)
{
return tree_to_shwi (TYPE_SIZE (type));
HOST_WIDE_INT align = tree_to_shwi (TYPE_SIZE (type));
if (align > MAX_OFILE_ALIGNMENT)
align = MAX_OFILE_ALIGNMENT;
return align;
}
bool

View file

@ -1,5 +1,8 @@
2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
PR c/69973
* gcc.dg/pr69973.c: New test.
PR rtl-optimization/69941
* gcc.dg/torture/pr69941.c: New test.

View file

@ -0,0 +1,2 @@
/* { dg-do compile } */
typedef int v4si __attribute__ ((vector_size (1 << 29)));