Commit c89ffd99 by Marek Polacek Committed by Marek Polacek

re PR tree-optimization/80612 (ICE in get_range_info, at tree-ssanames.c:375)

	PR tree-optimization/80612
	* calls.c (get_size_range): Check for INTEGRAL_TYPE_P.

	* gcc.dg/torture/pr80612.c: New test.

From-SVN: r247586
parent 261ce1e5
2017-05-04 Marek Polacek <polacek@redhat.com>
PR tree-optimization/80612
* calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com> 2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com> Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
......
...@@ -1270,7 +1270,7 @@ get_size_range (tree exp, tree range[2]) ...@@ -1270,7 +1270,7 @@ get_size_range (tree exp, tree range[2])
wide_int min, max; wide_int min, max;
enum value_range_type range_type enum value_range_type range_type
= (TREE_CODE (exp) == SSA_NAME = ((TREE_CODE (exp) == SSA_NAME && INTEGRAL_TYPE_P (TREE_TYPE (exp)))
? get_range_info (exp, &min, &max) : VR_VARYING); ? get_range_info (exp, &min, &max) : VR_VARYING);
if (range_type == VR_VARYING) if (range_type == VR_VARYING)
......
2017-05-04 Marek Polacek <polacek@redhat.com>
PR tree-optimization/80612
* gcc.dg/torture/pr80612.c: New test.
2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com> 2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com> Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
......
/* PR tree-optimization/80612 */
/* { dg-do compile } */
struct obstack *a;
struct obstack {
union {
void *plain;
void (*extra)();
} chunkfun;
} fn1(void p4()) {
a->chunkfun.plain = p4;
a->chunkfun.extra(a);
}
void fn2(int) __attribute__((__alloc_size__(1)));
void fn3() { fn1(fn2); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment