Bug 21457 - ICE building glibc 2.3.5 nptl in gen_subprogram_die at dwarf2out.c:10913
Summary: ICE building glibc 2.3.5 nptl in gen_subprogram_die at dwarf2out.c:10913
Status: RESOLVED DUPLICATE of bug 16676
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-05-08 22:45 UTC by benh
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: powerpc-linux-gcc
Target: powerpc-linux-gcc
Build: powerpc-linux-gcc
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Here is the .i file (9.96 KB, text/plain)
2005-05-08 22:46 UTC, benh
Details
And the half-generated .s file in case it's useful too (581 bytes, text/plain)
2005-05-08 22:47 UTC, benh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description benh 2005-05-08 22:45:46 UTC
So I get the above ICE   
   
(gen_subprogram_die at dwarf2out.c:10913) with debian's 3.4.4 shapshot  
(20050314). I'm currently building CVS top of branch to double check. It also  
happens with an older 20041116 build I have here.
Comment 1 benh 2005-05-08 22:46:45 UTC
Created attachment 8841 [details]
Here is the .i file
Comment 2 benh 2005-05-08 22:47:34 UTC
Created attachment 8842 [details]
And the half-generated .s file in case it's useful too
Comment 3 benh 2005-05-08 22:48:07 UTC
Oh, and sorry if I got the triplets wrong, I can never remember what are the 
"proper" ones ... 
 
Comment 4 benh 2005-05-08 23:19:46 UTC
Ok, this is with a CVS checkout of today, without the debian patches (that
changes the line number a bit). I now get:

../elf/tst-execstack-mod.c:24: internal compiler error: in gen_subprogram_die,
at dwarf2out.c:10887

The program is simple:

/* Test module for making nonexecutable stacks executable
   on load of a DSO that requires executable stacks.  */

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>

void callme (void (*callback) (void));

/* This is a function that makes use of executable stack by
   using a local function trampoline.  */
void
tryme (void)
{
  bool ok = false;
  void callback (void) { ok = true; }

  callme (&callback);

  if (ok)
    printf ("DSO called ok (local %p, trampoline %p)\n", &ok, &callback);
  else
    abort ();
}

void
callme (void (*callback) (void))
{
  (*callback) ();
}
Comment 5 benh 2005-05-08 23:23:52 UTC
Hrm... smells a bit like 16676 ... It really needs to be fixed asap, it prevents
building glibc in it's current state.
Comment 6 benh 2005-05-08 23:39:54 UTC
Same goes for iconvconfig.c:1244 in glibc too, so at least now 2 occurences of
this bug preventing build of glibc. This one is a nested function too, so I
suppose that is the real issue.
Comment 7 Drea Pinski 2005-05-09 00:03:50 UTC

*** This bug has been marked as a duplicate of 16676 ***