diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/20070725-1.c | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.dg/20070725-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20070725-1.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20070725-1.c b/gcc/testsuite/gcc.dg/20070725-1.c new file mode 100644 index 000000000..07b609cf8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20070725-1.c @@ -0,0 +1,64 @@ +/* This used to fail due to a ifcombine problem wrecking 64bit + checks. Fixed with rev. 126876. */ +/* { dg-do run } */ +/* { dg-options "-O1" } */ + +struct tree_base +{ + unsigned code:16; + + unsigned side_effects_flag:1; + unsigned constant_flag:1; + unsigned addressable_flag:1; + unsigned volatile_flag:1; + unsigned readonly_flag:1; + unsigned unsigned_flag:1; + unsigned asm_written_flag:1; + unsigned nowarning_flag:1; + + unsigned used_flag:1; + unsigned nothrow_flag:1; + unsigned static_flag:1; + unsigned public_flag:1; + unsigned private_flag:1; + unsigned protected_flag:1; + unsigned deprecated_flag:1; + unsigned invariant_flag:1; + + unsigned lang_flag_0:1; + unsigned lang_flag_1:1; + unsigned lang_flag_2:1; + unsigned lang_flag_3:1; + unsigned lang_flag_4:1; + unsigned lang_flag_5:1; + unsigned lang_flag_6:1; + unsigned visited:1; + + unsigned spare1:16; + unsigned spare2:8; + unsigned long a; +}; + +int +foo (struct tree_base *rhs) +{ + if (({const struct tree_base* __t = (rhs); __t;})->readonly_flag + && (rhs)->static_flag) + return 1; + + return 0; +} + +extern void abort (void); + +int +main () +{ + struct tree_base t; + + t.readonly_flag = t.static_flag = 0; + if (foo (&t)) + abort (); + + return 0; +} |