$ cat foo.c
struct rb_node
{
} __attribute__((aligned(sizeof(long))));

extern struct rb_node *rb_prev(struct rb_node *);
extern struct rb_node *rb_prev(struct rb_node *);
 $ gcc -c --combine foo.c foo.c
foo.c:6: error: conflicting types for ‘rb_prev’
foo.c:5: error: previous declaration of ‘rb_prev’ was here

gcc version 4.1.1 20060525 (Red Hat 4.1.1-1.pr27898)

Removing the explicit alignment fixes the problem.


-- 
           Summary: Compile failure with --combine and explicitly aligned
                    structures
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dwmw2 at infradead dot org
 GCC build triplet: powerpc-linux-gnu
  GCC host triplet: powerpc-linux-gnu
GCC target triplet: powerpc-linux-gnu, i386-linux-gnu


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

Reply via email to