https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104312
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |anlauf at gcc dot gnu.org
Last reconfirmed| |2023-04-05
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.
The issue may be clearer if the testcase is extended as follows:
function f()
real, pointer :: f, e
real, target :: a(2)
f => a(1)
return
entry e()
e => a(2)
end
so that one gets (before the traceback):
pr104312-zz.f90:5:8:
5 | return
| 1
Error: pointer value used where a floating-point was expected
pr104312-zz.f90:8:3:
8 | end
| 1
Error: pointer value used where a floating-point was expected
pr104312-zz.f90:1:0:
1 | function f()
|
internal compiler error: in fold_convert_loc, at fold-const.cc:2504
Setting a breakpoint in gfc_generate_return and checking the fndecl,
one sees that it is wrong for -ff2c.