Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 28712
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Jakub Jelinek <jakub@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: David Woodhouse <dwmw2@infradead.org>
Add CC:
CC:
Remove selected CCs
Build:
Patch URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 28712 depends on: Show dependency tree
Show dependency graph
Bug 28712 blocks: 28779

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-08-14 17:47 Opened: 2006-08-13 23:36
$ cat foo.i
struct tss_struct;

extern struct tss_struct *doublefault_tss;

struct tss_struct {
} __attribute__((packed));

 $ gcc -c --combine foo.i foo.i
 $ gcc -c --combine foo.i foo.i foo.i
foo.i:3: error: conflicting types for ‘doublefault_tss’
foo.i:3: error: previous declaration of ‘doublefault_tss’ was here

Removing the packed attribute, or compiling only _two_ of them together, makes
it work.

Seen with ppc->i686 GCC 4.1.0 and also
Fedora PowerPC gcc version 4.1.1 20060525 (Red Hat 4.1.1-1.pr27898)

(Both with Alex's patch for pr27898).

------- Comment #1 From Andrew Pinski 2006-08-13 23:46 -------
Confirmed, this worked in 3.4.0.

------- Comment #2 From Joseph S. Myers 2006-08-15 16:03 -------
The C front end part of the patch is OK.

------- Comment #3 From Jakub Jelinek 2006-09-23 07:15 -------
Subject: Bug 28712

Author: jakub
Date: Sat Sep 23 07:15:37 2006
New Revision: 117167

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117167
Log:
        PR c/28706
        PR c/28712
        * tree.c (merge_attributes, attribute_list_contained): If both
        TREE_VALUEs are TREE_LISTs, use simple_cst_list_equal instead of
        simple_cst_equal.
        * c-typeck.c (comptypes_internal): Don't consider aggregates
        in different TUs as compatible if there one set of attributes is
        not a subset of the other type's attributes.
        (composite_type): Try harder not to create a new aggregate type.

        * gcc.dg/pr28706.c: New test.
        * gcc.dg/pr28712.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr28706.c
    trunk/gcc/testsuite/gcc.dg/pr28712.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c

------- Comment #4 From Gabriel Dos Reis 2007-02-03 18:55 -------
won't fix in GCC-4.0.x.  Adjusting milestone.

------- Comment #5 From Alexandre Pereira Nunes 2008-01-15 17:58 -------
(In reply to comment #4)
> won't fix in GCC-4.0.x.  Adjusting milestone.
> 

For anyone interested, I think this is fixed for at least gcc 4.2.2; I couldn't
reproduce it.

------- Comment #6 From Joseph S. Myers 2008-07-04 15:49 -------
Closing 4.1 branch.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug