[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 --- Comment #6 from CVS Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:d5e1935b09fa05093e31d7ce5e21b7e71957c103 commit r13-2839-gd5e1935b09fa05093e31d7ce5e21b7e71957c103 Author: Mikael Morin Date: Wed Aug 31 11:58:08 2022 +0200 fortran: Support clobbering of ASSOCIATE variables [PR41453] This is in spirit a revert of: r9-3051-gc109362313623d83fe0a5194bceaf994cf0c6ce0 That commit added a condition to avoid generating ICE with clobbers of ASSOCIATE variables. The test added at that point continues to pass if we remove that condition now. PR fortran/41453 PR fortran/87401 gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_procedure_call): Remove condition disabling clobber generation for ASSOCIATE variables. gcc/testsuite/ChangeLog: * gfortran.dg/intent_optimize_8.f90: New test.
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 --- Comment #1 from janus at gcc dot gnu.org --- (In reply to janus from comment #0) > With current trunk this fails at runtime To be precise, I'm at r264522.
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 janus at gcc dot gnu.org changed: What|Removed |Added Keywords||wrong-code Target Milestone|--- |9.0
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 Thomas Koenig changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2018-09-24 Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org Ever confirmed|0 |1
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 Richard Biener changed: What|Removed |Added Priority|P3 |P4
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 --- Comment #2 from Thomas Koenig --- Quite clear what is going on. The tree dump shows assoc_intent_out () { static void sub (real(kind=4) & restrict); real(kind=4) r; { real(kind=4) * o; o = &r; o = {CLOBBER}; sub (o); L.1:; } } which is not the way to go :-)
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 --- Comment #3 from Thomas Koenig --- Author: tkoenig Date: Mon Sep 24 17:12:34 2018 New Revision: 264539 URL: https://gcc.gnu.org/viewcvs?rev=264539&root=gcc&view=rev Log: 2018-09-24 Thomas Koenig PR fortran/87397 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT) for variables in an associate statement. 2018-09-24 Thomas Koenig PR fortran/87401 * gfortran.dg/intent_out_12.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/intent_out_12.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 Thomas Koenig changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from Thomas Koenig --- Fixed, closing.
[Bug fortran/87401] [9 Regression] Runtime segfault with associated intent(out) variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401 --- Comment #5 from janus at gcc dot gnu.org --- (In reply to Thomas Koenig from comment #2) > Quite clear what is going on. The tree dump shows After r264539, the CLOBBER in the dump is gone again. However, wouldn't it be possible (desirable?) to keep it, but clobber the value instead of the pointer (since the intent(out) argument is not a pointer here), like so: *o = {CLOBBER}; sub (o);