[Bug fortran/109500] SIGABRT when calling a function that returns an unallocated value

2023-04-19 Thread leandro.lupori at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109500 --- Comment #12 from Leandro Lupori --- (In reply to anlauf from comment #11) > Do you have anybody else supporting the view that the code in question > should work as an extension? > I know there is some usage of this extension, in code simil

[Bug fortran/109500] SIGABRT when calling a function that returns an unallocated value

2023-04-17 Thread leandro.lupori at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109500 --- Comment #10 from Leandro Lupori --- Wouldn't it be better to turn this into a warning? Although using the result of a function as an allocatable argument doesn't conform with Fortran standards, it has been supported by gfortran for quite so

[Bug fortran/109500] SIGABRT when calling a function that returns an unallocated value

2023-04-13 Thread leandro.lupori at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109500 --- Comment #5 from Leandro Lupori --- Ok, thanks for the detailed explanations. Now I see that the standard doesn't allow the return of an unallocated value. This can be closed as invalid. But may I just ask a last related question? As mention

[Bug fortran/109500] SIGABRT when calling a function that returns an unallocated value

2023-04-13 Thread leandro.lupori at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109500 --- Comment #2 from Leandro Lupori --- Thanks for the quick response. What if 'f' is changed to this: function f() integer, allocatable :: f allocate(f) f = 123 deallocate(f) end function Is the program still invalid? gfortran -Wall

[Bug fortran/109500] New: SIGABRT when calling a function that returns an unallocated value

2023-04-13 Thread leandro.lupori at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109500 Bug ID: 109500 Summary: SIGABRT when calling a function that returns an unallocated value Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal