On Wed, Apr 1, 2020 at 1:19 PM Fritz Reese <fritzore...@gmail.com> wrote: [...] > is still good. Is this OK to commit to trunk and for backport? I'd > like to port as far back as 7.
I realized 7 branch is closed. I would backport to 8. > gcc/testsuite/ChangeLog: > 2020-04-01 Fritz Reese <fore...@gcc.gnu.org> > > PR fortran/85982 > * gfortran.dg/dec_structure_28.f90: New test. Forgot to include the testcase in the patch. Testcase is attached.
! { dg-do compile } ! { dg-options "-fdec-structure -fdec-static" } ! ! PR fortran/85982 ! ! Test a regression wherein some component attributes were erroneously accepted ! within a DEC structure. ! structure /s/ integer :: a integer, intent(in) :: b ! { dg-error "is not allowed" } integer, intent(out) :: c ! { dg-error "is not allowed" } integer, intent(inout) :: d ! { dg-error "is not allowed" } integer, dimension(1,1) :: e ! OK integer, external, pointer :: f ! { dg-error "is not allowed" } integer, intrinsic :: f ! { dg-error "is not allowed" } integer, optional :: g ! { dg-error "is not allowed" } integer, parameter :: h ! { dg-error "is not allowed" } integer, protected :: i ! { dg-error "is not allowed" } integer, private :: j ! { dg-error "is not allowed" } integer, static :: k ! { dg-error "is not allowed" } integer, automatic :: l ! { dg-error "is not allowed" } integer, public :: m ! { dg-error "is not allowed" } integer, save :: n ! { dg-error "is not allowed" } integer, target :: o ! { dg-error "is not allowed" } integer, value :: p ! { dg-error "is not allowed" } integer, volatile :: q ! { dg-error "is not allowed" } integer, bind(c) :: r ! { dg-error "is not allowed" } integer, asynchronous :: t ! { dg-error "is not allowed" } character(len=3) :: v ! OK integer(kind=4) :: w ! OK end structure end