]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: reject empty derived type with bind(C) attribute [PR101577]
authorHarald Anlauf <anlauf@gmx.de>
Sun, 2 Mar 2025 21:20:28 +0000 (22:20 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 3 Mar 2025 19:18:04 +0000 (20:18 +0100)
commitf9f16b9f74b767ca799a82f25be66a5fed25756d
tree3d1d967666f76188417cc846a216c164f8f8fe86
parent71355700432b15590123dc13833304c75ad8a0b6
Fortran: reject empty derived type with bind(C) attribute [PR101577]

PR fortran/101577

gcc/fortran/ChangeLog:

* symbol.cc (verify_bind_c_derived_type): Generate error message
for derived type with no components in standard conformance mode,
indicating that this is a GNU extension.

gcc/testsuite/ChangeLog:

* gfortran.dg/empty_derived_type.f90: Adjust dg-options.
* gfortran.dg/empty_derived_type_2.f90: New test.
gcc/fortran/symbol.cc
gcc/testsuite/gfortran.dg/empty_derived_type.f90
gcc/testsuite/gfortran.dg/empty_derived_type_2.f90 [new file with mode: 0644]