aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/array11.C
diff options
context:
space:
mode:
author(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-22 21:39:00 +0000
committer(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-22 21:39:00 +0000
commit2e9c0dc38e2692b04281844366dbb367ae1294e1 (patch)
treee56f44693864144d87710daeab9743d4e76b6037 /gcc/testsuite/g++.dg/init/array11.C
parent780b7d9b87ddf306aa31c750d5eb9d96a9cb69ea (diff)
This commit was manufactured by cvs2svn to create tagobjc-improvements-candidate-20030922
'objc-improvements-candidate-20030922'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/objc-improvements-candidate-20030922@71666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/init/array11.C')
-rw-r--r--gcc/testsuite/g++.dg/init/array11.C28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/array11.C b/gcc/testsuite/g++.dg/init/array11.C
new file mode 100644
index 00000000000..e52effe9ff7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array11.C
@@ -0,0 +1,28 @@
+/* PR 11665
+ Orgin: jwhite@cse.unl.edu
+ The problem was in initializer_constant_valid_p,
+ "for a CONSTRUCTOR, only the last element
+ of the CONSTRUCTOR was being checked"
+ (from the email of the patch which fixed this).
+ This used to ICE because GCC thought gdt_table was a
+ constant value when it is not. */
+
+int x;
+
+typedef __SIZE_TYPE__ size_t;
+
+struct gdt
+{
+size_t a,b,c,d,e,f;
+};
+void f()
+{
+struct gdt gdt_table[2]=
+{
+ {
+ 0,
+ ( (((size_t)(&x))<<(24))&(-1<<(8)) ),
+ },
+};
+}
+