[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-07-28 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268
Bug 61268 depends on bug 61919, which changed state.

Bug 61919 Summary: [4.10 regression] FAIL: gfortran.dg/fmt_g0_6.f08   -O2  
execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61919

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-07-24 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

--- Comment #10 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
---
Author: rsandifo
Date: Thu Jul 24 15:17:35 2014
New Revision: 213002

URL: https://gcc.gnu.org/viewcvs?rev=213002root=gccview=rev
Log:
gcc/
PR middle-end/61268
* function.c (assign_parm_setup_reg): Prevent invalid sharing of
DECL_INCOMING_RTL and entry_parm.
(get_arg_pointer_save_area): Likewise arg_pointer_save_area.
* calls.c (load_register_parameters): Likewise argument values.
(emit_library_call_value_1, store_one_arg): Likewise argument
save areas.
* config/i386/i386.c (assign_386_stack_local): Likewise the local
stack slot.
* explow.c (validize_mem): Modify the argument in-place.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/calls.c
trunk/gcc/config/i386/i386.c
trunk/gcc/explow.c
trunk/gcc/function.c


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-07-24 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
---
Patch applied.


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-07-17 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

--- Comment #8 from Rainer Orth ro at gcc dot gnu.org ---
Richard,

from my POV, the patch is good to go.

Thanks.
  Rainer


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-07-17 Thread pthaugen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

Pat Haugen pthaugen at gcc dot gnu.org changed:

   What|Removed |Added

 CC||pthaugen at gcc dot gnu.org

--- Comment #9 from Pat Haugen pthaugen at gcc dot gnu.org ---
Following tests started failing on powerpc64-unknown-linux-gnu with r210543.

FAIL: gcc.dg/vmx/gcc-bug-5.c   -O3 -g  (internal compiler error)
FAIL: gcc.dg/vmx/gcc-bug-6.c   -O3 -g  (internal compiler error)
FAIL: gcc.dg/vmx/varargs-7.c   -O3 -g  (internal compiler error)

I tried the patch from comment 5 and all 3 now pass. Bootstrap on
powerpc64-unknown-linux-gnu also passed with it.


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-06-24 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

--- Comment #7 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE ---
 --- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
 Uni-Bielefeld.DE ---
 --- Comment #5 from rsandifo at gcc dot gnu.org rsandifo at gcc dot 
 gnu.org ---
 [...]
 The patch passed bootstrap on x86_64-linux-gnu but could you test it for
 sparc too?

 Sure: sparc-sun-solaris2.11 bootstrap in progress.  I'll be leaving for
 a short vacation before that finishes, so don't expect a result before
 tuesday next week.

The bootstrap finished successfully and the ICE is gone.

Thanks.
Rainer


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-06-18 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rsandifo at gcc dot 
gnu.org

--- Comment #5 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
---
Created attachment 32962
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32962action=edit
Proposed patch

This was caused by some invalid rtl sharing between DECL_INCOMING_RTL
and the insn stream.  I think the right fix is (a) to copy stack_parm
and entry_parm before using them in the rtl stream and (b) as compensation,
to allow validize_mem to modify its argument in-place.  As well as fixing
the bug, this seems to reduce the total amount of rtl copying required.

Of course, the problem with (b) is that this could in turn expose other
invalid sharing bugs, so it's a bit frying-pan-to-fire.  I've tried to
look through all calls to validize_mem to see which might be affected.

The patch passed bootstrap on x86_64-linux-gnu but could you test it for
sparc too?


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-06-18 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE ---
 --- Comment #5 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
 ---
[...]
 The patch passed bootstrap on x86_64-linux-gnu but could you test it for
 sparc too?

Sure: sparc-sun-solaris2.11 bootstrap in progress.  I'll be leaving for
a short vacation before that finishes, so don't expect a result before
tuesday next week.

Thanks.
Rainer


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-06-17 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

 Target|sparc-sun-solaris2.11   |sparc-sun-solaris2.1[01]
 CC||rsandifo at gcc dot gnu.org
   Host|sparc-sun-solaris2.11   |sparc-sun-solaris2.1[01]
  Build|sparc-sun-solaris2.11   |sparc-sun-solaris2.1[01]

--- Comment #1 from Rainer Orth ro at gcc dot gnu.org ---
Richard, a reghunt has confirmed that this regression was caused by this patch:

2014-05-17  Richard Sandiford  rdsandif...@googlemail.com

* emit-rtl.h (replace_equiv_address, replace_equiv_address_nv): Add an
inplace argument.  Store the new address in the original MEM when true.
* emit-rtl.c (change_address_1): Likewise.
(adjust_address_1, adjust_automodify_address_1, offset_address):
Update accordingly.
* rtl.h (plus_constant): Add an inplace argument.
* explow.c (plus_constant): Likewise.  Try to reuse the original PLUS
when true.  Avoid generating (plus X (const_int 0)).
* function.c (instantiate_virtual_regs_in_rtx): Adjust the PLUS
in-place.  Pass true to plus_constant.
(instantiate_virtual_regs_in_insn): Pass true to replace_equiv_address.

I'm attaching the preprocessed testcase.  The failure can be reproduced with

 cc1 -fpreprocessed limits-fndefn.i -quiet -g -O3 -o limits-fndefn.s

Haven't tried in a cross compiler, though.

  Rainer


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-06-17 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

--- Comment #2 from Rainer Orth ro at gcc dot gnu.org ---
Created attachment 32954
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32954action=edit
preprocessed input


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-06-17 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2014-06/msg01357.ht
   ||ml
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |ro at gcc dot gnu.org

--- Comment #3 from Rainer Orth ro at gcc dot gnu.org ---
Fixed for 4.10.0.


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-06-17 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

 Status|RESOLVED|NEW
URL|https://gcc.gnu.org/ml/gcc- |
   |patches/2014-06/msg01357.ht |
   |ml  |
   Last reconfirmed||2014-06-17
 Resolution|FIXED   |---
   Assignee|ro at gcc dot gnu.org  |unassigned at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Rainer Orth ro at gcc dot gnu.org ---
Sorry, wrong PR.


[Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262

2014-05-21 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.10.0