This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/85786] [regression] Segfault in associated intrinsic
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 May 2018 18:32:20 +0000
- Subject: [Bug fortran/85786] [regression] Segfault in associated intrinsic
- Auto-submitted: auto-generated
- References: <bug-85786-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85786
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, May 15, 2018 at 05:49:15PM +0000, kargl at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85786
>
> kargl at gcc dot gnu.org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Priority|P3 |P4
> Status|UNCONFIRMED |NEW
> Last reconfirmed| |2018-05-15
> CC| |pault at gcc dot gnu.org
> Known to work| |6.4.1, 7.3.1
> Summary|Segfault in associated |[regression] Segfault in
> |intrinsic |associated intrinsic
> Ever confirmed|0 |1
> Known to fail| |8.1.1, 9.0
>
Seems I liekly found the issue.
Index: gcc/fortran/trans-intrinsic.c
===================================================================
--- gcc/fortran/trans-intrinsic.c (revision 260235)
+++ gcc/fortran/trans-intrinsic.c (working copy)
@@ -7903,6 +7903,8 @@ gfc_conv_associated (gfc_se *se, gfc_expr *expr)
/* A pointer to an array, call library function _gfor_associated.
*/
arg1se.want_pointer = 1;
gfc_conv_expr_descriptor (&arg1se, arg1->expr);
+ gfc_add_block_to_block (&se->pre, &arg1se.pre);
+ gfc_add_block_to_block (&se->post, &arg1se.post);
arg2se.want_pointer = 1;
gfc_conv_expr_descriptor (&arg2se, arg2->expr);