Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(832)

Issue 4636074: [pph] Fix ICE during gimplification (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by Diego Novillo
Modified:
12 years, 10 months ago
Reviewers:
CC:
Lawrence Crowl, Gabriel Charette, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -4 lines) Patch
M gcc/cp/ChangeLog.pph View 1 chunk +5 lines, -0 lines 0 comments Download
M gcc/cp/pph-streamer-in.c View 1 chunk +1 line, -1 line 0 comments Download
M gcc/testsuite/ChangeLog.pph View 1 chunk +4 lines, -0 lines 0 comments Download
M gcc/testsuite/g++.dg/pph/c1attr-warn-unused-result.cc View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 1
Diego Novillo
13 years ago (2011-06-29 20:50:07 UTC) #1
This patch fixes an ICE during gimplification.  When reading a
STATEMENT_LIST, we were calling append_to_statement_list, but at
that point some elements in the list do not have side-effects
(the final VAR_DECL in a stmt expression), so we were dropping it
out.

Fixed by force-adding every statetement we read.  This fixes
c1attr-warn-unused-result.cc.

Tested on x86_64.  Committed to branch.


	* pph-streamer-in.c (pph_read_tree): Call
	append_to_statement_list_force instead of append_to_statement_list.

testsuite/ChangeLog.pph

	* g++.dg/pph/c1attr-warn-unused-result.cc: Remove xfail marker.


diff --git a/gcc/cp/ChangeLog.pph b/gcc/cp/ChangeLog.pph
index c2679e6..a62dd66 100644
--- a/gcc/cp/ChangeLog.pph
+++ b/gcc/cp/ChangeLog.pph
@@ -1,3 +1,8 @@
+2011-06-29   Diego Novillo  <dnovillo@google.com>
+
+	* pph-streamer-in.c (pph_read_tree): Call
+	append_to_statement_list_force instead of append_to_statement_list.
+
 2011-06-28   Diego Novillo  <dnovillo@google.com>
 
 	* pph-streamer-in.c (pph_in_ld_fn): Instantiate
diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
index 1dabcf1..1a59640 100644
--- a/gcc/cp/pph-streamer-in.c
+++ b/gcc/cp/pph-streamer-in.c
@@ -1488,7 +1488,7 @@ pph_read_tree (struct lto_input_block *ib
ATTRIBUTE_UNUSED,
         for (i = 0; i < num_trees; i++)
 	  {
 	    tree stmt = pph_in_tree (stream);
-	    append_to_statement_list (stmt, &expr);
+	    append_to_statement_list_force (stmt, &expr);
 	  }
       }
       break;
diff --git a/gcc/testsuite/ChangeLog.pph b/gcc/testsuite/ChangeLog.pph
index 9c33875..aeede51 100644
--- a/gcc/testsuite/ChangeLog.pph
+++ b/gcc/testsuite/ChangeLog.pph
@@ -1,3 +1,7 @@
+2011-06-29  Diego Novillo  <dnovillo@google.com>
+
+	* g++.dg/pph/c1attr-warn-unused-result.cc: Remove xfail marker.
+
 2011-06-28  Diego Novillo  <dnovillo@google.com>
 
 	* g++.dg/pph/c1attr-warn-unused-result.cc: Expect an ICE.
diff --git a/gcc/testsuite/g++.dg/pph/c1attr-warn-unused-result.cc
b/gcc/testsuite/g++.dg/pph/c1attr-warn-unused-result.cc
index 4633106..da75561 100644
--- a/gcc/testsuite/g++.dg/pph/c1attr-warn-unused-result.cc
+++ b/gcc/testsuite/g++.dg/pph/c1attr-warn-unused-result.cc
@@ -1,6 +1,3 @@
-/* { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } } */
-// { dg-bogus "internal compiler error: Segmentation fault" "" { xfail *-*-* }
0 }
-// { dg-prune-output "In file included from" }
 /* { dg-options "-w" } */
 // pph asm xdiff
 #include "c1attr-warn-unused-result.h"

--
This patch is available for review at http://codereview.appspot.com/4636074
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b