diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2003-02-10 13:45:54 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2003-02-10 12:45:54 +0000 |
commit | ecf92f822777f05e82a0cb8c93232abf24df8318 (patch) | |
tree | 8a1d28c03b69fb9ba8205eed11d31cdecbf9221d /gcc/testsuite/gcc.dg/decl-2.c | |
parent | ac5e69da5659335b8f8d942b29bd01dc7384b6ad (diff) | |
download | gcc-ecf92f822777f05e82a0cb8c93232abf24df8318.zip gcc-ecf92f822777f05e82a0cb8c93232abf24df8318.tar.gz gcc-ecf92f822777f05e82a0cb8c93232abf24df8318.tar.bz2 |
re PR c/7741 (ICE on conflicting types (make_decl_rtl at varasm.c:834))
PR c/7741
* c-decl.c (duplicate_decls): Discard the initializer of the
new decl when the types are conflicting.
Co-Authored-By: Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
From-SVN: r62631
Diffstat (limited to 'gcc/testsuite/gcc.dg/decl-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/decl-2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/decl-2.c b/gcc/testsuite/gcc.dg/decl-2.c new file mode 100644 index 0000000..44fbc73 --- /dev/null +++ b/gcc/testsuite/gcc.dg/decl-2.c @@ -0,0 +1,10 @@ +/* PR c/7411 */ +/* Contributed by Christian Ehrhardt */ +/* { dg-do compile } */ + +void foo(void) +{ + char c; /* { dg-error "previous declaration" } */ + int i; + int c = i; /* { dg-error "conflicting types" } */ +} |