https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109043
Bug ID: 109043 Summary: Warning: Legacy Extension: Duplicate SAVE attribute (also ASYNCHRONOUS, VOLATILE) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gcc dot gnu.org Target Milestone: --- The following code gives surprising warnings: integer :: x, y, z volatile :: x volatile :: x asynchronous :: y asynchronous :: y save :: z save :: z end prxyz.f90:3:15: 3 | volatile :: x | 1 Warning: Legacy Extension: Duplicate VOLATILE attribute specified at (1) prxyz.f90:5:19: 5 | asynchronous :: y | 1 Warning: Legacy Extension: Duplicate ASYNCHRONOUS attribute specified at (1) prxyz.f90:7:11: 7 | save :: z | 1 Warning: Legacy Extension: Duplicate SAVE attribute specified at (1) I get errors instead of warnings when specifying -std=f2018, but they look strange to me: prxyz.f90:3:15: 3 | volatile :: x | 1 Error: Legacy Extension: Duplicate VOLATILE attribute specified at (1) prxyz.f90:5:19: 5 | asynchronous :: y | 1 Error: Legacy Extension: Duplicate ASYNCHRONOUS attribute specified at (1) prxyz.f90:7:11: 7 | save :: z | 1 Error: Legacy Extension: Duplicate SAVE attribute specified at (1) Does anybody know why these three were chosen to not give "normal" errors?