http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52585
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |burnus at gcc dot gnu.org
Summary|Dummy procedure pointer |Wromg result for ASSOCIATED
|loses its pointer |with dummy procedure
|association status |pointer
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-14
14:32:59 UTC ---
Thanks for the report!
It does not loose the pointer association state - it just takes (internally)
the wrong address as -fdump-tree-original shows.
It has the correct result for the main program/caller:
void (*<T4ac>) (void) pp;
pp = sub2;
if (pp != sub2 || pp == 0B)
_gfortran_stop_string (&"FAIL"[1]{lb: 1 sz: 1}, 4);
But in subroutine s, it uses the wrong address:
s (void (*<T4ac>) (void) * ss)
{
if (ss != sub2 || ss == 0B)
_gfortran_stop_string (&"FAIL2"[1]{lb: 1 sz: 1}, 5);
The "ss != sub2 || ss = 0B" should have been a "*ss != sub2 || *ss == 0B" in
this C-like dump.