aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/decl-2.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2003-02-10 13:45:54 +0100
committerEric Botcazou <ebotcazou@gcc.gnu.org>2003-02-10 12:45:54 +0000
commitecf92f822777f05e82a0cb8c93232abf24df8318 (patch)
tree8a1d28c03b69fb9ba8205eed11d31cdecbf9221d /gcc/testsuite/gcc.dg/decl-2.c
parentac5e69da5659335b8f8d942b29bd01dc7384b6ad (diff)
downloadgcc-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.c10
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" } */
+}