[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #14 from Jason Merrill  ---
Fixed.

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #12 from Jason Merrill  ---
Author: jason
Date: Fri Jan  8 16:01:35 2016
New Revision: 232169

URL: https://gcc.gnu.org/viewcvs?rev=232169=gcc=rev
Log:
PR c++/68983

PR c++/67557
* call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/init/elide4.C
Modified:
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/call.c

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #11 from Jason Merrill  ---
Author: jason
Date: Fri Jan  8 16:01:12 2016
New Revision: 232167

URL: https://gcc.gnu.org/viewcvs?rev=232167=gcc=rev
Log:
PR c++/68983 (BE)

PR c++/67557
gcc/
* function.c (assign_temp): Guard against TREE_ADDRESSABLE types here.
* expr.c (store_field): Not here.
* tree-cfgcleanup.c (fixup_noreturn_call): Don't clear LHS of a
call with TREE_ADDRESSABLE type.
* tree-cfg.c (verify_gimple_call): Adjust.
gcc/cp/
* cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
TREE_ADDRESSABLE type.

Added:
trunk/gcc/testsuite/g++.dg/init/base1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cvt.c
trunk/gcc/expr.c
trunk/gcc/function.c
trunk/gcc/tree-cfg.c
trunk/gcc/tree-cfgcleanup.c

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #13 from Jason Merrill  ---
Author: jason
Date: Fri Jan  8 16:02:10 2016
New Revision: 232171

URL: https://gcc.gnu.org/viewcvs?rev=232171=gcc=rev
Log:
PR c++/68983

PR c++/67557
* call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.

Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/init/elide4.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/call.c

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #10 from Jason Merrill  ---
Author: jason
Date: Fri Jan  8 16:01:05 2016
New Revision: 232166

URL: https://gcc.gnu.org/viewcvs?rev=232166=gcc=rev
Log:
PR c++/68983 (FE)

PR c++/67557
* call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.

Added:
trunk/gcc/testsuite/g++.dg/init/elide4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-07 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #9 from Jason Merrill  ---
(In reply to lucdanton from comment #8)
> class A {
> public:
>   A m_fn1();
>   A(A const &);
>   int *L;
>   int ref;
> };
> struct B : A {
>   using base_type = A;
>   B();
> };
> B::B() : base_type((0, m_fn1())) {}

This one is actually a front end issue.

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

--- Comment #4 from Markus Trippelsdorf  ---
*** Bug 69159 has been marked as a duplicate of this bug. ***

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #5 from Jason Merrill  ---
Created attachment 37245
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37245=edit
possible patch

Would this be an appropriate fix?  It seems that if the source is a ref we
won't copy anything onto the stack.

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread lucdanton at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #8 from lucdanton at free dot fr ---
(In reply to Jason Merrill from comment #7)
> (In reply to lucdanton from comment #6)
> > I've independently run into this bug and applying this patch to HEAD doesn't
> > help on my end, the same ICE happens (except it is now pointing to line 
> > 6660 of
> > course).
> 
> Good to know.  Please attach a testcase?

Compiled with: g++-trunk -std=c++11 main.cpp

class A {
public:
  A m_fn1();
  A(A const &);
  int *L;
  int ref;
};
struct B : A {
  using base_type = A;
  B();
};
B::B() : base_type((0, m_fn1())) {}

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #7 from Jason Merrill  ---
(In reply to lucdanton from comment #6)
> I've independently run into this bug and applying this patch to HEAD doesn't
> help on my end, the same ICE happens (except it is now pointing to line 6660 
> of
> course).

Good to know.  Please attach a testcase?

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread lucdanton at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

lucdanton at free dot fr changed:

   What|Removed |Added

 CC||lucdanton at free dot fr

--- Comment #6 from lucdanton at free dot fr ---
(In reply to Jason Merrill from comment #5)
> Created attachment 37245 [details]
> possible patch
> 
> Would this be an appropriate fix?  It seems that if the source is a ref we
> won't copy anything onto the stack.

I've independently run into this bug and applying this patch to HEAD doesn't
help
on my end, the same ICE happens (except it is now pointing to line 6660 of
course).