[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread hp at gcc dot gnu dot org


--- Comment #12 from hp at gcc dot gnu dot org  2009-08-13 05:30 ---
.


-- 

hp at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031



[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread bonzini at gcc dot gnu dot org


--- Comment #11 from bonzini at gnu dot org  2009-08-12 16:28 ---
Subject: Bug 41031

Author: bonzini
Date: Wed Aug 12 16:28:36 2009
New Revision: 150701

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150701
Log:
2009-08-12  Richard Sandiford  

PR tree-optimization/41031
* tree-outof-ssa.c (insert_value_copy_on_edge): Use promote_decl_mode
on the partition variable rather than promote_mode on the source
type.  Assert that the partition variable's type has the same
mode as the source value's.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-outof-ssa.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031



[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread hp at gcc dot gnu dot org


--- Comment #10 from hp at gcc dot gnu dot org  2009-08-12 14:11 ---
(In reply to comment #9)
> (In reply to comment #8)
> > The patch is already approved, so I'm going to commit it on behalf of 
> > rsandifo.
> 
> Oops, I see it's not completely tested yet.
> Ok, I'm doing a test-run on cris-elf first.
> (If someone knows it's already sufficiently tested somewhere, please do the
> honors.)

The patch fixes the build problem with no regressions at r150593.  I'm not
committing it though, see
.
(FWIW, r150678 has a separate ICE at build for cris-elf.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031



[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread hp at gcc dot gnu dot org


--- Comment #9 from hp at gcc dot gnu dot org  2009-08-12 10:34 ---
(In reply to comment #8)
> The patch is already approved, so I'm going to commit it on behalf of 
> rsandifo.

Oops, I see it's not completely tested yet.
Ok, I'm doing a test-run on cris-elf first.
(If someone knows it's already sufficiently tested somewhere, please do the
honors.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031



[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread hp at gcc dot gnu dot org


--- Comment #8 from hp at gcc dot gnu dot org  2009-08-12 10:30 ---
(In reply to comment #6)
> From just reading the ChangeLog, a likely candidate:

That's already established by the revision range in the description. :)
The patch is already approved, so I'm going to commit it on behalf of rsandifo.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031



[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread laurent at guerby dot net


--- Comment #7 from laurent at guerby dot net  2009-08-12 09:15 ---
There's a patch.


-- 

laurent at guerby dot net changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2009-
   ||08/msg00615.html


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031



[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread laurent at guerby dot net


--- Comment #6 from laurent at guerby dot net  2009-08-12 09:13 ---
>From just reading the ChangeLog, a likely candidate:

2009-08-09  Richard Sandiford  

   * tree-out-of-ssa.c (insert_value_copy_on_edge): If the source
   and destination have different modes, Use promote_mode to
   determine the signedness of the conversion.  Assert that the
   promoted source mode matches the destination mode.  Don't pass
   the destination and destination mode to expand_expr if the source
   mode is different.  Simplify conversion logic.

--- gcc/tree-outof-ssa.c(revision 150589)
+++ gcc/tree-outof-ssa.c(revision 150648)
@@ -195,7 +195,9 @@
 insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
 {
   rtx seq, x;
-  enum machine_mode mode;
+  enum machine_mode dest_mode, src_mode;
+  int unsignedp;
+
   if (dump_file && (dump_flags & TDF_DETAILS))
 {
   fprintf (dump_file,
@@ -214,14 +216,21 @@
 set_curr_insn_source_location (locus);

   start_sequence ();
-  mode = GET_MODE (SA.partition_to_pseudo[dest]);
-  x = expand_expr (src, SA.partition_to_pseudo[dest], mode, EXPAND_NORMAL);
-  if (GET_MODE (x) != VOIDmode && GET_MODE (x) != mode)
-x = convert_to_mode (mode, x, TYPE_UNSIGNED (TREE_TYPE (src)));
-  if (CONSTANT_P (x) && GET_MODE (x) == VOIDmode
-  && mode != TYPE_MODE (TREE_TYPE (src)))
-x = convert_modes (mode, TYPE_MODE (TREE_TYPE (src)),
- x, TYPE_UNSIGNED (TREE_TYPE (src)));
+
+  src_mode = TYPE_MODE (TREE_TYPE (src));
+  unsignedp = TYPE_UNSIGNED (TREE_TYPE (src));
+  dest_mode = promote_mode (TREE_TYPE (src), src_mode, &unsignedp);
+  gcc_assert (dest_mode == GET_MODE (SA.partition_to_pseudo[dest]));
+
+  if (src_mode != dest_mode)
+{
+  x = expand_expr (src, NULL, src_mode, EXPAND_NORMAL);
+  x = convert_modes (dest_mode, src_mode, x, unsignedp);
+}
+  else
+x = expand_expr (src, SA.partition_to_pseudo[dest],
+dest_mode, EXPAND_NORMAL);
+
   if (x != SA.partition_to_pseudo[dest])
 emit_move_insn (SA.partition_to_pseudo[dest], x);
   seq = get_insns ();


-- 

laurent at guerby dot net changed:

   What|Removed |Added

 CC||laurent at guerby dot net,
   ||rdsandiford at googlemail
   ||dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031



[Bug bootstrap/41031] [4.5 Regression] ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf

2009-08-12 Thread laurent at guerby dot net


--- Comment #5 from laurent at guerby dot net  2009-08-12 09:09 ---
Same happens on sparc64 in 64 bits bootstrap in all-stage2-libiberty:

/home/guerby/build/./prev-gcc/xgcc -B/home/guerby/build/./prev-gcc/
-B/n/62/guerby/install-trunk-64/sparc64-unknown-linux-gnu/bin/
-B/n/62/guerby/install-trunk-64/sparc64-unknown-linux-gnu/bin/ -B/n/62/guer\
by/install-trunk-64/sparc64-unknown-linux-gnu/lib/ -isystem
/n/62/guerby/install-trunk-64/sparc64-unknown-linux-gnu/include -isystem
/n/62/guerby/install-trunk-64/sparc64-unknown-linux-gnu/sys-include-c\
 -DHAVE_CONFIG_H -g -O2  -I. -I../../trunk/libiberty/../include  -W -Wall
-Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 
../../trunk/libiberty/regex.c -o regex.o
In file included from ../../trunk/libiberty/regex.c:638:0:
../../trunk/libiberty/regex.c: In function 'byte_re_match_2_internal':
../../trunk/libiberty/regex.c:7476:5: warning: jump skips variable
initialization
../../trunk/libiberty/regex.c:5952:12: note: label 'restore_best_regs' defined
here
../../trunk/libiberty/regex.c:5913:16: note: 'same_str_p' declared here
../../trunk/libiberty/regex.c:5543:1: internal compiler error: in
insert_value_copy_on_edge, at tree-outof-ssa.c:223

According to my logs revision range is:

150589 ok
150648 ko


-- 

laurent at guerby dot net changed:

   What|Removed |Added

  Component|tree-optimization   |bootstrap
   GCC host triplet|x86_64-unknown-linux-gnu|
 GCC target triplet|cris-axis-elf   |
   Priority|P3  |P1
Summary|[4.5 Regression]: build |[4.5 Regression] ICE in
   |breakage for cris-elf   |insert_value_copy_on_edge
   |building newlib, ICE in |preventing bootstrap on
   |insert_value_copy_on_edge   |sparc64 and s390x, testcase
   ||on cris-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031