re PR debug/45500 (ICE: in rtl_for_decl_init, at dwarf2out.c:16307 with -g -msse...
authorJakub Jelinek <jakub@redhat.com>
Fri, 3 Sep 2010 09:53:44 +0000 (11:53 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 3 Sep 2010 09:53:44 +0000 (11:53 +0200)
PR debug/45500
* dwarf2out.c (rtl_for_decl_init): Give up for all generic vectors,
not just generic vectors with BLKmode.

* gcc.target/i386/pr45500.c: New test.

From-SVN: r163803

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr45500.c [new file with mode: 0644]

index 9368985a8dd4e6ef76051f3d7c6c54665058c8d9..d313703e62a33c48a47b93bba213c70acca8e6d7 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/45500
+       * dwarf2out.c (rtl_for_decl_init): Give up for all generic vectors,
+       not just generic vectors with BLKmode.
+
 2010-09-03  Richard Guenther  <rguenther@suse.de>
 
        * tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE.
index 4a43d47147f21f030eb676fba7404187ff9270ff..7c4c523572622591bafc81f884bb335c6d9b31c9 100644 (file)
@@ -16256,7 +16256,8 @@ rtl_for_decl_init (tree init, tree type)
     ;
   /* Vectors only work if their mode is supported by the target.
      FIXME: generic vectors ought to work too.  */
-  else if (TREE_CODE (type) == VECTOR_TYPE && TYPE_MODE (type) == BLKmode)
+  else if (TREE_CODE (type) == VECTOR_TYPE
+          && !VECTOR_MODE_P (TYPE_MODE (type)))
     ;
   /* If the initializer is something that we know will expand into an
      immediate RTL constant, expand it now.  We must be careful not to
index 0a15006ba07841611bf00092a7941c0f10c3c294..5b089016c6c143108ef3e984c3a3f43bce14a3da 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/45500
+       * gcc.target/i386/pr45500.c: New test.
+
 2010-09-03  Mingjie Xing <mingjie.xing@gmail.com>
 
        * gcc.target/mips/loongson-shift-count-truncated-1.c: New.
diff --git a/gcc/testsuite/gcc.target/i386/pr45500.c b/gcc/testsuite/gcc.target/i386/pr45500.c
new file mode 100644 (file)
index 0000000..46e5100
--- /dev/null
@@ -0,0 +1,6 @@
+/* PR debug/45500 */
+/* { dg-do compile } */
+/* { dg-options "-g -msse" } */
+
+typedef char V __attribute__ ((__vector_size__ (16)));
+static const V s = { '\n', '\r', '?', '\\' };