Fortran: Add !GCC$ attributes NOINLINE,NORETURN,WEAK
authorRimvydas Jasinskas <rimvydas.jas@gmail.com>
Sun, 12 Feb 2023 06:16:51 +0000 (06:16 +0000)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 13 Feb 2023 17:35:26 +0000 (18:35 +0100)
commit086a1df4374962787db37c1f0d1bd9beb828f9e3
treea94688f95cc312c3dece0c6cfee62c78d83856db
parent72ae1e5635648bd3f6a5760ca46d531ad1f2c6b1
Fortran: Add !GCC$ attributes NOINLINE,NORETURN,WEAK

gcc/fortran/ChangeLog:

* decl.cc: Add EXT_ATTR_NOINLINE, EXT_ATTR_NORETURN, EXT_ATTR_WEAK.
* gfortran.h (ext_attr_id_t): Ditto.
* gfortran.texi (GCC$ ATTRIBUTES): Document them.
* trans-decl.cc (build_function_decl): Apply them.

gcc/testsuite/ChangeLog:

* gfortran.dg/noinline.f90: New test.
* gfortran.dg/noreturn-1.f90: New test.
* gfortran.dg/noreturn-2.f90: New test.
* gfortran.dg/noreturn-3.f90: New test.
* gfortran.dg/noreturn-4.f90: New test.
* gfortran.dg/noreturn-5.f90: New test.
* gfortran.dg/weak-1.f90: New test.

Signed-off-by: Rimvydas Jasinskas <rimvydas.jas@gmail.com>
gcc/fortran/decl.cc
gcc/fortran/gfortran.h
gcc/fortran/gfortran.texi
gcc/fortran/trans-decl.cc
gcc/testsuite/gfortran.dg/noinline.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/noreturn-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/noreturn-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/noreturn-3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/noreturn-4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/noreturn-5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/weak-1.f90 [new file with mode: 0644]