diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20030704-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20030704-1.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030704-1.c b/gcc/testsuite/gcc.c-torture/compile/20030704-1.c new file mode 100644 index 000000000..101355c8b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20030704-1.c @@ -0,0 +1,17 @@ +/* PR c/11428. */ + +/* fold_single_bit_test() failed to return a tree of the type that the + outer expression was looking for. Specifically, it returned a tree + whose type corresponded to QImode for !p->m, but the desired result + type was int, which corresponded to SImode. emit_move_insn() later + tried to copy a reg:QI to reg:SI, causing an ICE. */ + +struct s { + int m : 1; +}; + +int +foo (struct s *p) +{ + return !p->m; +} |