[Bug middle-end/41149] New: -fdump-tree-original and procedure pointer components
janus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Aug 23 20:35:00 GMT 2009
There seems to be a bug in the tree dump related to procedure pointer
components ('PPC', a Fortran 2003 feature which would probably be described as
"function pointers as structure components" in C). In particular: When calling
such a PPC, the dump only shows the component name, while the name of the
object which contains the component is omitted. This is not language dependent
and is also observed for C code, as the following example shows:
#include <stdio.h>
typedef long funcPtr(char *);
long func(char * str)
{
printf("%s\n", str);
return 0;
}
int main(void)
{
long l;
struct
{
funcPtr *ppc;
} t;
t.ppc = func;
l = t.ppc("Hello");
return l;
}
The dump shows (with -fdump-tree-original):
t.ppc = (long int (*<T617>) (char *)) func;
l = ppc ((char *) "Hello");
In the second line I would expect to see 't.ppc' instead of just 'ppc'.
For a Fortran example see PR 41139.
--
Summary: -fdump-tree-original and procedure pointer components
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41149
More information about the Gcc-bugs
mailing list