public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/27758]  New: [4.1 regression] -O0 -fpic link failure
@ 2006-05-24 15:46 jakub at gcc dot gnu dot org
  2006-05-24 15:50 ` [Bug target/27758] " jakub at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-24 15:46 UTC (permalink / raw)
  To: gcc-bugs

/* { dg-do run { target fpic } } */
/* { dg-options "-O0 -fpic" } */

typedef int (*fn) (void);

static inline int
foo (void)
{
  return 1;
}

fn
test (void)
{
  return foo;
}

int
main (void)
{
  fn f = test ();
  return f () != 1;
}

doesn't link on i386/x86_64 in 4.1 (regression from 4.0) - function foo isn't
marked as referenced and therefore not emitted.
This was fixed on the trunk in PR25758.


-- 
           Summary: [4.1 regression] -O0 -fpic link failure
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: i386-linux, x86_64-linux


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-06-09 16:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-24 15:46 [Bug target/27758] New: [4.1 regression] -O0 -fpic link failure jakub at gcc dot gnu dot org
2006-05-24 15:50 ` [Bug target/27758] " jakub at gcc dot gnu dot org
2006-05-24 15:53 ` pinskia at gcc dot gnu dot org
2006-05-25  2:42 ` mmitchel at gcc dot gnu dot org
2006-05-26 14:18 ` jakub at gcc dot gnu dot org
2006-05-26 14:19 ` jakub at gcc dot gnu dot org
2006-05-26 16:15 ` pinskia at gcc dot gnu dot org
2006-06-09 16:56 ` pinskia at gcc dot gnu dot 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).