https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92284
Bug ID: 92284 Summary: Subroutine with bind(c) attribute causing varied problems Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jrfsousa at gmail dot com Target Milestone: --- Created attachment 47130 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47130&action=edit Code demonstrating problems. Hi all! Code attached causes various problems in both 9.1.0 and 10.0.0 including ICE on 9.1.0. The problems reported vary depending on the array having the allocatable or pointer attributes. -Wmaybe-uninitialized reports uninitialized internal variables -fcheck=* changes which. When it runs the error is: At line 26 of file ./arr.f90 Fortran runtime error: Index '1' of dimension 1 of array 'this' above upper bound of 0 Error termination. Backtrace: #0 0x401051 in arr_set at ./arr.f90:26 #1 0x4011c5 in arr_p at ./arr.f90:11 #2 0x40147c in main at ./arr.f90:14 Thank you very much. Best regards, José Rui