[multiple changes]
2012-01-21 Tobias Burnus <burnus@net-b.de> Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/50556 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE attribure. 2012-01-21 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/50556 * gfortran.dg/namelist_74.f90: New test. * gfortran.dg/namelist_59.f90: Remove SAVE attribute. From-SVN: r183370
This commit is contained in:
parent
076ec830bf
commit
bb3a6981bf
|
@ -1,3 +1,10 @@
|
||||||
|
2012-01-21 Tobias Burnus <burnus@net-b.de>
|
||||||
|
Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/50556
|
||||||
|
* symbol.c (check_conflict): namelist-group-name cannot have the SAVE
|
||||||
|
attribure.
|
||||||
|
|
||||||
2012-01-21 Tobias Burnus <burnus@net-b.de>
|
2012-01-21 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR fortran/51913
|
PR fortran/51913
|
||||||
|
|
|
@ -444,12 +444,15 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
|
||||||
a1 = gfc_code2string (flavors, attr->flavor);
|
a1 = gfc_code2string (flavors, attr->flavor);
|
||||||
a2 = save;
|
a2 = save;
|
||||||
goto conflict;
|
goto conflict;
|
||||||
|
case FL_NAMELIST:
|
||||||
|
gfc_error ("Namelist group name at %L cannot have the "
|
||||||
|
"SAVE attribute", where);
|
||||||
|
return FAILURE;
|
||||||
|
break;
|
||||||
case FL_PROCEDURE:
|
case FL_PROCEDURE:
|
||||||
/* Conflicts between SAVE and PROCEDURE will be checked at
|
/* Conflicts between SAVE and PROCEDURE will be checked at
|
||||||
resolution stage, see "resolve_fl_procedure". */
|
resolution stage, see "resolve_fl_procedure". */
|
||||||
case FL_VARIABLE:
|
case FL_VARIABLE:
|
||||||
case FL_NAMELIST:
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2012-01-21 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/50556
|
||||||
|
* gfortran.dg/namelist_74.f90: New test.
|
||||||
|
* gfortran.dg/namelist_59.f90: Remove SAVE attribute.
|
||||||
|
|
||||||
2012-01-21 Tobias Burnus <burnus@net-b.de>
|
2012-01-21 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR fortran/51913
|
PR fortran/51913
|
||||||
|
|
|
@ -16,7 +16,6 @@ subroutine process(string)
|
||||||
integer :: i=1,j=2,k=3
|
integer :: i=1,j=2,k=3
|
||||||
integer ios
|
integer ios
|
||||||
namelist /cmd/ i,j,k
|
namelist /cmd/ i,j,k
|
||||||
save cmd
|
|
||||||
lines(1)='&cmd'
|
lines(1)='&cmd'
|
||||||
lines(2)=string
|
lines(2)=string
|
||||||
lines(3)='/'
|
lines(3)='/'
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
! { dg-do compile }
|
||||||
|
! PR fortran/50556
|
||||||
|
subroutine foo
|
||||||
|
save i
|
||||||
|
namelist /i/ ii ! { dg-error "cannot have the SAVE attribute" }
|
||||||
|
end subroutine foo
|
||||||
|
subroutine bar
|
||||||
|
namelist /i/ ii
|
||||||
|
save i ! { dg-error "cannot have the SAVE attribute" }
|
||||||
|
end subroutine bar
|
Loading…
Reference in New Issue