[Bug fortran/102333] Invalid PROCEDURE statement accepted.

albert at tugraz dot at gcc-bugzilla@gcc.gnu.org
Sun Mar 29 06:01:56 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102333

--- Comment #19 from Christopher Albert <albert at tugraz dot at> ---
I reran the exact Bugzilla sources from comments 0, 1, and 2 on the current
upstream branch heads on 2026-03-29:

  trunk/master  a3b49ec48b7749250fe5acf3918bad4c6c4f7a62
  gcc-15        9cefb203c4010b139a69f1575fcdec14075d2731
  gcc-14        f8cc39faaa3cfa44efb484a60d2eb7684572b85c
  gcc-13        e8896d8d6c4275bbd00ae6fba4b3f609e6affaba

Results:

  trunk/master:
    comment 0  accepted
    comment 1  rejected: PROCEDURE attribute conflicts with ALLOCATABLE
attribute
    comment 2a accepted
    comment 2b accepted

  gcc-15:
    comment 0  accepted
    comment 1  rejected: PROCEDURE attribute conflicts with ALLOCATABLE
attribute
    comment 2a accepted
    comment 2b accepted

  gcc-14:
    comment 0  ICE in gfc_generate_function_code
    comment 1  rejected: PROCEDURE attribute conflicts with ALLOCATABLE
attribute
    comment 2a ICE in gfc_generate_function_code
    comment 2b ICE in gfc_generate_function_code

  gcc-13:
    comment 0  ICE in gfc_generate_function_code
    comment 1  accepted
    comment 2a ICE in gfc_generate_function_code
    comment 2b ICE in gfc_generate_function_code

So the current upstream heads show a split state:

- the old ICE is still present on gcc-13 and gcc-14
- the old ICE is gone on gcc-15 and trunk
- comment 1 is already rejected on gcc-14, gcc-15, and trunk
- comment 1 is still accepted on gcc-13
- the pointer forms from comments 0 and 2 are accepted on gcc-15 and trunk

Also:
- only trunk has the PR102333 testcase commit
r16-8026-g8a0a1a0c7b187415e34dcf7a5cbf5e314c9de78a
- Paul's suggested
    gfc_check_conflict (&current_attr, NULL, &gfc_current_locus);
  line is not present in decl.cc on any of trunk, gcc-15, gcc-14, or gcc-13

Given this, I think PR102333 currently mixes two different questions:
1. the original ICE, which still matters for gcc-13/gcc-14
2. the accepts-invalid question from comment 1, which is already resolved on
gcc-14/gcc-15/trunk

Unless there is a standard basis to reject the pointer cases from comments 0
and 2, I do not think there is a replacement trunk patch to post right now.


More information about the Gcc-bugs mailing list