When gimplifying an address operand we may expose an indirect
ref via DECL_VALUE_EXPR for example. This is dealt with in the
code already but it fails to consider that INDIRECT_REFs get
gimplified to MEM_REFs.
Fixed which makes the ICE observed on x86_64-netbsd go away.
2020-04-07 Richard Biener <rguenther@suse.de>
PR middle-end/94479
* gimplify.c (gimplify_addr_expr): Also consider generated
MEM_REFs.
* gcc.dg/torture/pr94479.c: New testcase.
+2020-04-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/94479
+ * gimplify.c (gimplify_addr_expr): Also consider generated
+ MEM_REFs.
+
2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/arm_mve.h: Add C++ polymorphism and fix preserve MACROs.
/* For various reasons, the gimplification of the expression
may have made a new INDIRECT_REF. */
- if (TREE_CODE (op0) == INDIRECT_REF)
+ if (TREE_CODE (op0) == INDIRECT_REF
+ || (TREE_CODE (op0) == MEM_REF
+ && integer_zerop (TREE_OPERAND (op0, 1))))
goto do_indirect_ref;
mark_addressable (TREE_OPERAND (expr, 0));
+2020-04-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/94479
+ * gcc.dg/torture/pr94479.c: New testcase.
+
2020-04-01 Fritz Reese <foreese@gcc.gnu.org>
PR fortran/93871
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-stack-check "specific" } */
+/* { dg-additional-options "-fstack-check -w" } */
+
+int a;
+struct b {
+ char c;
+ void *d;
+};
+struct b e() {
+ struct b f[] = {{}, "", f, a};
+}