[Bug c++/44298] New: code addressed only by label with it's address taken is ignored

yuri at tsoft dot com gcc-bugzilla@gcc.gnu.org
Thu May 27 18:51:00 GMT 2010


The testcase below passes the entry point to 'lll' call as an address of the
label ll_def. printf line disappears completely.

Obviously people should only use such code when they really know what they are
doing. But compilation result here is complately wrong and isn't usable in any
way.

--- testcase ---
#include <stdio.h>
#include <stdlib.h>

__attribute__ ((noinline)) void lll(void*) {
}

void mainx() {
  lll(&&ll_def);
  return;
ll_def:
  printf("default\n");
  return;
}


-- 
           Summary: code addressed only by label with it's address taken is
                    ignored
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuri at tsoft dot com


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



More information about the Gcc-bugs mailing list