[patch, fortran] PR 17758, make abort and exit noreturn
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Mon Aug 22 22:19:00 GMT 2005
:REVIEWMAIL:
Thomas Koenig wrote:
> 2005-08-12 Thomas Koenig <Thomas.Koenig@online.de>
>
> PR fortran/17758
> * gfortran.h (symbol_attribute): Add noreturn to the structure.
> (gfc_intrinsic_sym): Add noreturn to the structure.
> * intrinsic.c (make_noreturn): New function.
> (add_subroutines): Mark subroutines abort and exit as noreturn.
> (gfc_intrinsic_sub_interface): Copy noreturn attribute from
> isym to the resolved symbol.
> * trans-decl.c (gfc_get_extern_function_decl): Set function
> as VOLATILE (== noreturn) if the noreturn attribute is set.
>
> 2005-08-12 Thomas Koenig <Thomas.Koenig@online.de>
>
> PR fortran/17758
> gfortran.dg/nonreturning_statements.f90: New test.
This is ok, given that the next_sym[-1] ugliness is existing practice.
WRT the testcase, it seems safer to scan the assembly for the names of the
bogus functions (i.e. use dg-scan-assembler-not, see
http://gcc.gnu.org/wiki/HowToPrepareATestcase) instead of assuming that the
calls will be removed even at -O0.
- Tobi
More information about the Fortran
mailing list