mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 00:40:59 +08:00
re PR fortran/69455 ([F08] Assembler error(s) when using intrinsic modules in two BLOCK)
2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69455 * trans-decl.c (generate_local_decl): Avoid misconstructed intrinsic modules in a BLOCK construct. 2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69455 * gfortran.dg/pr69455_1.f90: New test. * gfortran.dg/pr69455_2.f90: Ditto. From-SVN: r277193
This commit is contained in:
parent
ee31b9755e
commit
b83b9ffd0b
@ -1,3 +1,9 @@
|
||||
2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/69455
|
||||
* trans-decl.c (generate_local_decl): Avoid misconstructed
|
||||
intrinsic modules in a BLOCK construct.
|
||||
|
||||
2019-09-15 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
Backport from trunk
|
||||
|
@ -5662,7 +5662,14 @@ generate_local_decl (gfc_symbol * sym)
|
||||
|
||||
if (sym->ns && sym->ns->construct_entities)
|
||||
{
|
||||
if (sym->attr.referenced)
|
||||
/* Construction of the intrinsic modules within a BLOCK
|
||||
construct, where ONLY and RENAMED entities are included,
|
||||
seems to be bogus. This is a workaround that can be removed
|
||||
if someone ever takes on the task to creating full-fledge
|
||||
modules. See PR 69455. */
|
||||
if (sym->attr.referenced
|
||||
&& sym->from_intmod != INTMOD_ISO_C_BINDING
|
||||
&& sym->from_intmod != INTMOD_ISO_FORTRAN_ENV)
|
||||
gfc_get_symbol_decl (sym);
|
||||
sym->mark = 1;
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/69455
|
||||
* gfortran.dg/pr69455_1.f90: New test.
|
||||
* gfortran.dg/pr69455_2.f90: Ditto.
|
||||
|
||||
2019-10-17 Bill Schmidt <wschmidt@linux.ibm.com>
|
||||
|
||||
Backport from mainline
|
||||
|
14
gcc/testsuite/gfortran.dg/pr69455_1.f90
Normal file
14
gcc/testsuite/gfortran.dg/pr69455_1.f90
Normal file
@ -0,0 +1,14 @@
|
||||
! { dg-do run }
|
||||
program foo
|
||||
block
|
||||
use, intrinsic :: iso_c_binding, only: wp => c_float, ik => c_int
|
||||
if (ik /= 4) stop 1
|
||||
if (wp /= 4) stop 2
|
||||
end block
|
||||
block
|
||||
use, intrinsic :: iso_c_binding, only: wp => c_double, ik => c_int64_t
|
||||
if (ik /= 8) stop 3
|
||||
if (wp /= 8) stop 4
|
||||
end block
|
||||
end program foo
|
||||
|
13
gcc/testsuite/gfortran.dg/pr69455_2.f90
Normal file
13
gcc/testsuite/gfortran.dg/pr69455_2.f90
Normal file
@ -0,0 +1,13 @@
|
||||
! { dg-do run }
|
||||
program foo
|
||||
block
|
||||
use, intrinsic :: ISO_FORTRAN_ENV, only: wp => REAL32, ik => INT32
|
||||
if (ik /= 4) stop 1
|
||||
if (wp /= 4) stop 2
|
||||
end block
|
||||
block
|
||||
use, intrinsic :: ISO_FORTRAN_ENV, only: wp => REAL64, ik => INT64
|
||||
if (ik /= 8) stop 3
|
||||
if (wp /= 8) stop 4
|
||||
end block
|
||||
end program foo
|
Loading…
x
Reference in New Issue
Block a user