This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] New test for PRE bug


This segfaults the compiler due to a bug in PRE.

        * gcc.c-torture/compile/20030917-1.c: New test.

Index: 20030917-1.c
===================================================================
RCS file: 20030917-1.c
diff -N 20030917-1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- 20030917-1.c	18 Sep 2003 03:52:12 -0000
***************
*** 0 ****
--- 1,18 ----
+ typedef struct string STR;
+ typedef struct atbl ARRAY;
+ struct string {
+     unsigned char str_pok;
+ };
+ struct atbl {
+     int ary_fill;
+ };
+ blah(size,strp)
+ register int size;
+ register STR **strp;
+ {
+     register ARRAY *ar;
+     ar->ary_fill = size - 1;
+     while (size--)
+      (*strp)->str_pok &= ~128;
+ }
+ 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]