[Bug fortran/81978] Passing component of a parameter array to a subroutine causes SIGBUS crash
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Sat Sep 16 13:27:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81978
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-09-16
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed from 4.8 up to trunk (8.0). The original dump shows that the argument
of match_word is not expanded to a constant:
...
static struct pp_struct pp[2] = {{.name="pi
", .value=3.099999904632568359375e+0}, {.name="twopi
", .value=6.30000019073486328125e+0}};
...
{
struct array1_unknown atmp.1;
character(kind=1) A.2[2][1:40];
integer(kind=8) D.3566;
typedef character(kind=1) [2][1:40];
atmp.1.dtype = 2609;
atmp.1.dim[0].stride = 1;
atmp.1.dim[0].lbound = 0;
atmp.1.dim[0].ubound = 1;
atmp.1.data = (void * restrict) &A.2;
atmp.1.offset = 0;
{
integer(kind=8) S.3;
S.3 = 0;
while (1)
{
if (S.3 > 1) goto L.1;
__builtin_memmove ((void *) &(*(character(kind=1)[2][1:40] *
restrict) atmp.1.data)[S.3], (void *) &pp[S.3].name, 40);
S.3 = S.3 + 1;
}
L.1:;
}
match_word (&atmp.1, 40);
...
More information about the Gcc-bugs
mailing list