OSDN Git Service

2008-01-13 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 13 Jan 2008 16:30:51 +0000 (16:30 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 13 Jan 2008 16:30:51 +0000 (16:30 +0000)
PR middle-end/34601
* emit-rtl.c (set_reg_attrs_for_decl_rtl): Use DECL_MODE
instead of TYPE_MODE to deal with calls from expand_one_error_var.

* gcc.dg/noncompile/incomplete-4.c: New testcase.

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

gcc/ChangeLog
gcc/emit-rtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/noncompile/incomplete-4.c [new file with mode: 0644]

index 9ea747d..27b4882 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-13  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/34601
+       * emit-rtl.c (set_reg_attrs_for_decl_rtl): Use DECL_MODE
+       instead of TYPE_MODE to deal with calls from expand_one_error_var.
+
 2008-01-13  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcse.c (cprop_jump): Call validate_unshare_change instead of
index 5a2aede..bef4d58 100644 (file)
@@ -1006,7 +1006,7 @@ set_reg_attrs_for_decl_rtl (tree t, rtx x)
   if (REG_P (x))
     REG_ATTRS (x)
       = get_reg_attrs (t, byte_lowpart_offset (GET_MODE (x),
-                                              TYPE_MODE (TREE_TYPE (t))));
+                                              DECL_MODE (t)));
   if (GET_CODE (x) == CONCAT)
     {
       if (REG_P (XEXP (x, 0)))
index b067970..521407a 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-13  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/34601
+       * gcc.dg/noncompile/incomplete-4.c: New testcase.
+
 2008-01-13  Jan Hubicka  <jh@suse.cz>
 
        PR middle-end/32135
diff --git a/gcc/testsuite/gcc.dg/noncompile/incomplete-4.c b/gcc/testsuite/gcc.dg/noncompile/incomplete-4.c
new file mode 100644 (file)
index 0000000..a4f4769
--- /dev/null
@@ -0,0 +1,4 @@
+void foo()
+{
+  enum E e; /* { dg-error "storage size" } */
+}