Commit fbdeeaac by Janus Weil

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
parent 34652576
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> 2013-04-04 Tobias Burnus <burnus@net-b.de>
PR fortran/50269 PR fortran/50269
......
...@@ -4040,10 +4040,6 @@ gfc_match_return (void) ...@@ -4040,10 +4040,6 @@ gfc_match_return (void)
goto cleanup; goto cleanup;
} }
if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate RETURN "
"at %C") == FAILURE)
return MATCH_ERROR;
if (gfc_current_form == FORM_FREE) if (gfc_current_form == FORM_FREE)
{ {
/* The following are valid, so we can't require a blank after the /* The following are valid, so we can't require a blank after the
......
...@@ -1719,6 +1719,10 @@ gfc_match_actual_arglist (int sub_flag, gfc_actual_arglist **argp) ...@@ -1719,6 +1719,10 @@ gfc_match_actual_arglist (int sub_flag, gfc_actual_arglist **argp)
if (m != MATCH_YES) if (m != MATCH_YES)
goto cleanup; goto cleanup;
if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate-return argument "
"at %C") == FAILURE)
goto cleanup;
tail->label = label; tail->label = label;
goto next; goto next;
} }
......
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> 2013-04-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp (check_effective_target_arm_v8_neon_hw): * lib/target-supports.exp (check_effective_target_arm_v8_neon_hw):
......
! { dg-do compile } ! { dg-do compile }
! { dg-options "-std=gnu" }
subroutine foo (a) subroutine foo (a)
real t, a, baz real t, a, baz
call bar (*10) call bar (*10)
......
! { dg-do run } ! { dg-do run }
! { dg-options "-std=legacy" } ! { dg-options "-std=gnu" }
! !
! Tests the fix for PR30236, which was due to alternate returns ! Tests the fix for PR30236, which was due to alternate returns
! in generic interfaces causing a segfault. They now work ! in generic interfaces causing a segfault. They now work
......
! { dg-do compile } ! { dg-do compile }
! { dg-options "-std=gnu" }
!
! Tests the fix for PR28172, in which an ICE would result from ! Tests the fix for PR28172, in which an ICE would result from
! the contained call with an alternate retrun. ! the contained call with an alternate retrun.
......
! { dg-do run } ! { dg-do run }
! { dg-options "-std=legacy" } ! { dg-options "-std=gnu" }
! !
! Tests the fix for PR31483, in which dummy argument procedures ! Tests the fix for PR31483, in which dummy argument procedures
! produced an ICE if they had an alternate return. ! produced an ICE if they had an alternate return.
! !
! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de> ! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
SUBROUTINE R (i, *, *) SUBROUTINE R (i, *, *)
INTEGER i INTEGER i
RETURN i RETURN i
END END
SUBROUTINE PHLOAD (READER, i, res) SUBROUTINE PHLOAD (READER, i, res)
IMPLICIT NONE IMPLICIT NONE
EXTERNAL READER EXTERNAL READER
integer i integer i
character(3) res character(3) res
CALL READER (i, *1, *2) CALL READER (i, *1, *2)
1 res = "one" 1 res = "one"
return return
2 res = "two" 2 res = "two"
return 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 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
! { dg-do compile } ! { dg-do compile }
! { dg-options "-std=legacy" } ! { dg-options "-std=gnu" }
! !
! PR 32938 ! PR 32938
subroutine r (*) subroutine r (*)
......
! { dg-do compile } ! { dg-do compile }
! { dg-options "-std=legacy" } ! { dg-options "-std=gnu" }
! !
! PR 40848: [4.5 Regression] ICE with alternate returns ! PR 40848: [4.5 Regression] ICE with alternate returns
! !
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment