PR tree-optimization/80612
* calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
* gcc.dg/torture/pr80612.c: New test.
From-SVN: r247586
+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>
Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
wide_int min, max;
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);
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>
Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
--- /dev/null
+/* 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); }