diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-02-29 23:43:29 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-02-29 23:43:29 +0000 |
commit | c5b6f18e7a3d5a9269704287ca91483d60476e66 (patch) | |
tree | 79f67c731f4bdf068313a3e2b873f2feb80a0d5d /gcc/testsuite/gcc.dg/always_inline3.c | |
parent | 39876352716051ef43f55ba526b907ae86ae55a9 (diff) | |
download | gcc-c5b6f18e7a3d5a9269704287ca91483d60476e66.zip gcc-c5b6f18e7a3d5a9269704287ca91483d60476e66.tar.gz gcc-c5b6f18e7a3d5a9269704287ca91483d60476e66.tar.bz2 |
re PR middle-end/13448 (gcc 3.3.2, internal error when -O3 and trying to modify function const arg)
PR middle-end/13448
* c-tree.h (readonly_warning): Rename to ...
(readonly_error): ... this.
* c-typeck.c (build_unary_op): Adjust accordingly.
(readonly_warning): Rename to ...
(readonly_error): ... this and issue errors, not warnings.
(build_modify_expr): Call readonly_error, not readonly_warning.
(c_expand_asm_operands): Likewise.
* tree-inline.c (optimize_inline_calls): Do not inline functions
after errors have occurred.
PR middle-end/13448
* gcc.dg/inline-5.c: New test.
* gcc.dg/always-inline.c: Split out tests into ...
* gcc.dg/always-inline2.c: ... this and ...
* gcc.dg/always-inline3.c: ... this.
From-SVN: r78682
Diffstat (limited to 'gcc/testsuite/gcc.dg/always_inline3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/always_inline3.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/always_inline3.c b/gcc/testsuite/gcc.dg/always_inline3.c new file mode 100644 index 0000000..b183770 --- /dev/null +++ b/gcc/testsuite/gcc.dg/always_inline3.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-Winline -O2" } */ +inline __attribute__ ((always_inline)) void +q2(void) +{ /* { dg-error "recursive" "" } */ + q2(); /* { dg-error "called from here" "" } */ + q2(); /* { dg-error "called from here" "" } */ +} |