OSDN Git Service

PR c++/49264
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Jun 2011 17:14:31 +0000 (17:14 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Jun 2011 17:14:31 +0000 (17:14 +0000)
* gimple-fold.c (fold_stmt_1): Don't try to fold *& on the lhs
if stmt folded into nothing.
* tree-inline.c (fold_marked_statements): If a builtin at the
end of a bb folded into nothing, just update cgraph edges
and move to next bb.
* cgraph.c (cgraph_update_edges_for_call_stmt_node): Allow new_stmt
to be NULL.  Don't compute count and frequency if new_call is NULL.

* g++.dg/opt/pr49264.C: New test.

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

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/pr49294.c [new file with mode: 0644]

index 165783f..967371c 100644 (file)
@@ -1,5 +1,9 @@
 2011-06-06  Jakub Jelinek  <jakub@redhat.com>
 
+       PR debug/49294
+       * dwarf2out.c (mem_loc_descriptor) <do_shift>: Give up for
+       non-MODE_INT modes.
+
        PR c++/49264
        * gimple-fold.c (fold_stmt_1): Don't try to fold *& on the lhs
        if stmt folded into nothing.
index b3cf4a6..0fa7f91 100644 (file)
@@ -14904,6 +14904,8 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
       goto do_shift;
 
     do_shift:
+      if (GET_MODE_CLASS (mode) != MODE_INT)
+       break;
       op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode,
                                VAR_INIT_STATUS_INITIALIZED);
       {
index 6d27ed9..4eacaf2 100644 (file)
@@ -1,5 +1,8 @@
 2011-06-06  Jakub Jelinek  <jakub@redhat.com>
 
+       PR debug/49294
+       * gcc.dg/debug/pr49294.c: New test.
+
        PR c++/49264
        * g++.dg/opt/pr49264.C: New test.
 
diff --git a/gcc/testsuite/gcc.dg/debug/pr49294.c b/gcc/testsuite/gcc.dg/debug/pr49294.c
new file mode 100644 (file)
index 0000000..e4869e0
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR debug/49294 */
+/* { dg-do compile } */
+
+typedef __attribute__ ((vector_size ((8) * sizeof (short)))) short V;
+
+int k;
+V v;
+
+void
+foo (void)
+{
+  V w = { k, k, k, k, k, k, k, k };
+  V x = v >> w;
+}