public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44365]  New: ICE with -fdump-tree-all
@ 2010-06-01 13:55 bmei at broadcom dot com
  2010-06-01 14:38 ` [Bug c/44365] " rguenth at gcc dot gnu dot org
  2010-06-01 18:16 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 4+ messages in thread
From: bmei at broadcom dot com @ 2010-06-01 13:55 UTC (permalink / raw)
  To: gcc-bugs

GCC produces the ICE for the following code with -fdump-tree-all. This happens
in both 4.4.x as well as 4.5.0. It is caused by infinitely recursive call to
dump_generic_node (tree-pretty-print.c)

gcc t.c -fdump-tree-all


int main(int argc, char *argv[]){
        int n;
        if(argc==2)
                n=atoi(argv[1]);
        else{
                exit(1);
        }

#define offset(x,y) ((char *)&(x->y))-((char *)x)

        struct {
                int a[n];
                char b[n];
                char c;
        }*bar;
        printf("%d %d %d %d
\n",offset(bar,a[0]),offset(bar,b[0]),offset(bar,c),sizeof(*bar));
        return 0;
}


-- 
           Summary: ICE with -fdump-tree-all
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bmei at broadcom dot com
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44365


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <bug-44365-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-01-29  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 13:55 [Bug c/44365] New: ICE with -fdump-tree-all bmei at broadcom dot com
2010-06-01 14:38 ` [Bug c/44365] " rguenth at gcc dot gnu dot org
2010-06-01 18:16 ` pinskia at gcc dot gnu dot org
     [not found] <bug-44365-4@http.gcc.gnu.org/bugzilla/>
2012-01-29  4:40 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).