https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85870

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase that still ICEs in patch form:
--- gcc/testsuite/gcc.dg/lto/pr85870_0.c.jj     2018-12-05 14:30:47.506208171
+0100
+++ gcc/testsuite/gcc.dg/lto/pr85870_0.c        2018-12-05 14:29:15.468725392
+0100
@@ -0,0 +1,34 @@
+/* PR c/85870 */
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -flto -O2 } } } */
+
+typedef struct abc_s {
+  char a1;
+  short a2;
+  unsigned int a3;
+  unsigned int a4;
+} abc;
+
+typedef struct xyz_s {
+ unsigned x1;
+ unsigned x2;
+ abc *x3;
+} xyz;
+
+extern xyz XYZ[3];
+static const abc Arr1[]={
+                       {0,0,0xdeadbeaf,0xbeefdead} ,
+#line 1040
+                        {0,0,0xdeadbeaf,0xbeefdead} };
+
+void init_xyz_0() {
+  XYZ[0].x1=975753;
+  XYZ[0].x2=1024;
+  XYZ[0].x3=(abc *)Arr1;
+
+}
+
+int
+main ()
+{
+}
--- gcc/testsuite/gcc.dg/lto/pr85870_1.c.jj     2018-12-05 14:30:53.269113163
+0100
+++ gcc/testsuite/gcc.dg/lto/pr85870_1.c        2018-12-05 14:29:22.613607607
+0100
@@ -0,0 +1,27 @@
+typedef struct abc_s {
+  char a1;
+  short a2;
+  unsigned int a3;
+  unsigned int a4;
+} abc;
+
+
+typedef struct xyz_s {
+ unsigned int x1;
+ unsigned int x2;
+ abc *x3;
+} xyz;
+
+
+extern xyz XYZ[3];
+static const abc Arr2[]={
+                       {0,0,0xbeafdead,0xdeadbeef} ,
+#line 1048594
+                           {0,0,0xbeafdead,0xdeadbeef} };
+
+void init_xyz_1() {
+  XYZ[1].x1=425753;
+  XYZ[1].x2=1048576;
+  XYZ[1].x3=(abc *)Arr2;
+
+}

Reply via email to