PR target/27421
authorreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 May 2006 21:15:33 +0000 (21:15 +0000)
committerreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 May 2006 21:15:33 +0000 (21:15 +0000)
* config/i386/i386.c (classify_argument): Skip fields with invalid
types.

* gcc.dg/array-9.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113609 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/array-9.c [new file with mode: 0644]

index 7f3cd34..5f35ff3 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR target/27421
+       * config/i386/i386.c (classify_argument): Skip fields with invalid
+       types.
+
 2006-05-07  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/27409
index cb4eaea..a092484 100644 (file)
@@ -2961,6 +2961,9 @@ classify_argument (enum machine_mode mode, tree type,
                {
                  int num;
 
+                 if (TREE_TYPE (field) == error_mark_node)
+                   continue;
+
                  /* Bitfields are always classified as integer.  Handle them
                     early, since later code would consider them to be
                     misaligned integers.  */
index 7041216..f15d7fc 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR target/27421
+       * gcc.dg/array-9.c: New test.
+
 2006-05-07  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/27409
diff --git a/gcc/testsuite/gcc.dg/array-9.c b/gcc/testsuite/gcc.dg/array-9.c
new file mode 100644 (file)
index 0000000..f173f65
--- /dev/null
@@ -0,0 +1,10 @@
+/* PR target/27421 */
+/* { dg-do compile } */
+
+struct A
+{
+  int i;
+  void x[1];  /* { dg-error "array of voids" } */
+};
+
+void foo(struct A a) {}