[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 --- Comment #11 from vehre at gcc dot gnu.org --- Sorry, for neglecting the paper work over fixing bugs and implementing new features ;-)
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 janus at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED --- Comment #10 from janus at gcc dot gnu.org --- (In reply to vehre from comment #9) > Waiting one week for regressions before closing. I think we've waited long enough (almost two weeks now). Closing.
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |7.0
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 vehre at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|WAITING --- Comment #9 from vehre at gcc dot gnu.org --- Waiting one week for regressions before closing.
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 --- Comment #8 from vehre at gcc dot gnu.org --- Author: vehre Date: Wed Nov 16 13:45:29 2016 New Revision: 242490 URL: https://gcc.gnu.org/viewcvs?rev=242490=gcc=rev Log: gcc/fortran/ChangeLog: 2016-11-16 Andre VehreschildPR fortran/78356 * class.c (gfc_is_class_scalar_expr): Prevent taking an array ref for a component ref. * trans-expr.c (gfc_trans_assignment_1): Ensure a reference to the object to copy is generated, when assigning class objects. gcc/testsuite/ChangeLog: 2016-11-16 Andre Vehreschild PR fortran/78356 * gfortran.dg/class_allocate_23.f08: New test. Added: trunk/gcc/testsuite/gfortran.dg/class_allocate_23.f08 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/class.c trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 --- Comment #7 from vehre at gcc dot gnu.org --- Fix at: https://gcc.gnu.org/ml/fortran/2016-11/msg00140.html
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 --- Comment #6 from Andrew Benson --- (In reply to janus from comment #3) > (In reply to janus from comment #2) > > I suspect it may be caused by Andre's r241885 ... > > I may be wrong, though: It seems like reverting those changes does not solve > the problem. > > Another candidate: r241439. > > > @Andrew: Are you aware of an earlier trunk build where this was still > working? If yes, can you give a revision number? I didn't record the previous revision number I used unfortunately, but it looks like you were able to figure out the problem revision anyway,
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 vehre at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |vehre at gcc dot gnu.org
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 --- Comment #5 from Dominique d'Humieres --- Revision r241433 works, but r241509 does not.
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 --- Comment #4 from janus at gcc dot gnu.org --- (In reply to janus from comment #3) > > I suspect it may be caused by Andre's r241885 ... > > I may be wrong, though: It seems like reverting those changes does not solve > the problem. > > Another candidate: r241439. Indeed reverting r241439 (on top of the other one) seems to fix the problem, so apparently this one is the culprit.
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 --- Comment #3 from janus at gcc dot gnu.org --- (In reply to janus from comment #2) > I suspect it may be caused by Andre's r241885 ... I may be wrong, though: It seems like reverting those changes does not solve the problem. Another candidate: r241439. @Andrew: Are you aware of an earlier trunk build where this was still working? If yes, can you give a revision number?
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 janus at gcc dot gnu.org changed: What|Removed |Added CC||vehre at gcc dot gnu.org --- Comment #2 from janus at gcc dot gnu.org --- I suspect it may be caused by Andre's r241885 ...
[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356 janus at gcc dot gnu.org changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIRMED |NEW Last reconfirmed||2016-11-15 CC||janus at gcc dot gnu.org Known to work||5.4.1, 6.2.0 Summary|segfault allocating |[7 Regression] [OOP] |polymorphic variable with |segfault allocating |polymorphic component with |polymorphic variable with |allocatable component |polymorphic component with ||allocatable component Ever confirmed|0 |1 --- Comment #1 from janus at gcc dot gnu.org --- I can confirm that the code runs fine with 6.2 and 5.4, but segfaults with trunk. Slightly reduced test case: program p implicit none type ac end type type, extends(ac) :: a integer, allocatable :: b end type type n class(ac), allocatable :: acr(:) end type type(n) :: s,t allocate(a :: s%acr(1)) call nncp(s,t) contains subroutine nncp(self,tg) type(n) :: self, tg allocate(tg%acr(1),source=self%acr(1)) end end