------- Additional Comments From benh at kernel dot crashing dot org  
2005-05-08 23:19 -------
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) ();
}

-- 


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

Reply via email to