This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/47278] New: [4.3/4.4/4.5 Regression] hidden weak function not handled properly


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

           Summary: [4.3/4.4/4.5 Regression] hidden weak function not
                    handled properly
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


> cat t1.c
int foo (void) { return 1; }
> cat t2.c
extern void abort (void);

int __attribute__((weak,visibility("hidden"))) foo (void)
{
  return 0;
}

int main()
{
  if (foo() != 1)
    abort ();
  return 0;
}


This worked fine with GCC 4.1 and does work fine with GCC 4.6.

I have a patch for 4.3 for the moment.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]