re PR fortran/40881 ([F03] warn for obsolescent features)

2013-04-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40881
	* match.c (gfc_match_return): Remove standard notification.
	* primary.c (gfc_match_actual_arglist): Add standard notification.


2013-04-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40881
	* gfortran.dg/altreturn_1.f90: Add -std=gnu.
	* gfortran.dg/altreturn_4.f90: Ditto.
	* gfortran.dg/altreturn_3.f90: Replace -std=legacy by -std=gnu.
	* gfortran.dg/altreturn_5.f90: Ditto.
	* gfortran.dg/altreturn_6.f90: Ditto.
	* gfortran.dg/altreturn_7.f90: Ditto.

From-SVN: r197495
This commit is contained in:
Janus Weil 2013-04-04 21:21:01 +02:00
parent 3465257612
commit fbdeeaac53
10 changed files with 57 additions and 38 deletions

View File

@ -1,3 +1,9 @@
2013-04-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/40881
* match.c (gfc_match_return): Remove standard notification.
* primary.c (gfc_match_actual_arglist): Add standard notification.
2013-04-04 Tobias Burnus <burnus@net-b.de>
PR fortran/50269

View File

@ -4040,10 +4040,6 @@ gfc_match_return (void)
goto cleanup;
}
if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate RETURN "
"at %C") == FAILURE)
return MATCH_ERROR;
if (gfc_current_form == FORM_FREE)
{
/* The following are valid, so we can't require a blank after the

View File

@ -1719,6 +1719,10 @@ gfc_match_actual_arglist (int sub_flag, gfc_actual_arglist **argp)
if (m != MATCH_YES)
goto cleanup;
if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate-return argument "
"at %C") == FAILURE)
goto cleanup;
tail->label = label;
goto next;
}

View File

@ -1,3 +1,13 @@
2013-04-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/40881
* gfortran.dg/altreturn_1.f90: Add -std=gnu.
* gfortran.dg/altreturn_4.f90: Ditto.
* gfortran.dg/altreturn_3.f90: Replace -std=legacy by -std=gnu.
* gfortran.dg/altreturn_5.f90: Ditto.
* gfortran.dg/altreturn_6.f90: Ditto.
* gfortran.dg/altreturn_7.f90: Ditto.
2013-04-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp (check_effective_target_arm_v8_neon_hw):

View File

@ -1,4 +1,6 @@
! { dg-do compile }
! { dg-options "-std=gnu" }
subroutine foo (a)
real t, a, baz
call bar (*10)

View File

@ -1,5 +1,5 @@
! { dg-do run }
! { dg-options "-std=legacy" }
! { dg-options "-std=gnu" }
!
! Tests the fix for PR30236, which was due to alternate returns
! in generic interfaces causing a segfault. They now work

View File

@ -1,4 +1,6 @@
! { dg-do compile }
! { dg-options "-std=gnu" }
!
! Tests the fix for PR28172, in which an ICE would result from
! the contained call with an alternate retrun.

View File

@ -1,33 +1,32 @@
! { dg-do run }
! { dg-options "-std=legacy" }
!
! Tests the fix for PR31483, in which dummy argument procedures
! produced an ICE if they had an alternate return.
!
! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
SUBROUTINE R (i, *, *)
INTEGER i
RETURN i
END
SUBROUTINE PHLOAD (READER, i, res)
IMPLICIT NONE
EXTERNAL READER
integer i
character(3) res
CALL READER (i, *1, *2)
1 res = "one"
return
2 res = "two"
return
END
EXTERNAL R
character(3) res
call PHLOAD (R, 1, res)
if (res .ne. "one") call abort ()
CALL PHLOAD (R, 2, res)
if (res .ne. "two") call abort ()
! { dg-do run }
! { dg-options "-std=gnu" }
!
! Tests the fix for PR31483, in which dummy argument procedures
! produced an ICE if they had an alternate return.
!
! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
SUBROUTINE R (i, *, *)
INTEGER i
RETURN i
END
SUBROUTINE PHLOAD (READER, i, res)
IMPLICIT NONE
EXTERNAL READER
integer i
character(3) res
CALL READER (i, *1, *2)
1 res = "one"
return
2 res = "two"
return
END
EXTERNAL R
character(3) res
call PHLOAD (R, 1, res)
if (res .ne. "one") call abort ()
CALL PHLOAD (R, 2, res)
if (res .ne. "two") call abort ()
END

View File

@ -1,5 +1,5 @@
! { dg-do compile }
! { dg-options "-std=legacy" }
! { dg-options "-std=gnu" }
!
! PR 32938
subroutine r (*)

View File

@ -1,5 +1,5 @@
! { dg-do compile }
! { dg-options "-std=legacy" }
! { dg-options "-std=gnu" }
!
! PR 40848: [4.5 Regression] ICE with alternate returns
!