diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-11 22:48:36 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-11 22:48:36 +0000 |
commit | cbe814171569f91464ba834dd80447a2b98e9e69 (patch) | |
tree | 07534e5cce41f7cf4660e3ee80dff3853f126e1d /gcc/testsuite/gcc.dg/20040310-1.c | |
parent | 2538b6a32033377dcdcd8d45ac3450be8410dc0c (diff) | |
download | gcc-cbe814171569f91464ba834dd80447a2b98e9e69.tar.gz |
ChangeLog:
* combine.c (if_then_else_cond): Check for NULL return value of
simplify_gen_subreg.
testsuite/ChangeLog:
* gcc.dg/20040310-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79347 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20040310-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20040310-1.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20040310-1.c b/gcc/testsuite/gcc.dg/20040310-1.c new file mode 100644 index 00000000000..104e98d0889 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20040310-1.c @@ -0,0 +1,34 @@ +/* This caused cc1 to segfault on s390x-ibm-linux + due to a bug in if_then_else_cond (combine.c). */ + +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +extern void use (unsigned int x); + +int main (void) +{ + union + { + unsigned int x; + unsigned long pad; + } A; + + struct + { + unsigned int x : 1; + } B; + + A.x = 1; + B.x = 1; + A.x /= B.x; + use (A.x); + + A.x = 1; + B.x = 1; + B.x /= A.x; + use (B.x); + + return 0; +} + |