help-rcs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug c/14518] New: Trivial failure with IMA at -O0


From: dalej at gcc dot gnu dot org
Subject: [Bug c/14518] New: Trivial failure with IMA at -O0
Date: 10 Mar 2004 23:43:13 -0000

The following is a failure with IMA on fairly basic stuff.  Compile the files 
together as
cc -O0 -c -o foo.o file1.c file2.c
You get a multiply defined symbol in the .s file.  This goes away with -O2 or 
higher.

There should probably be an IMA component, I don't think this is the last 
problem
we'll have with it (and Geoff insists it's not an optimization, so that's 
inappropriate).

/* file 1 */
char *globals[] = {"a", "b"};
foo() {
  printf("%s\n", globals[0]);
}

/* file 2 */
extern char *globals[];
main() {
  printf("%s\n", globals[1]);
}

-- 
           Summary: Trivial failure with IMA at -O0
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dalej at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]