Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 27898
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Alexandre Oliva <aoliva@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
pr27898.patch Patch that fixes the bug patch 2006-07-05 06:04 689 bytes Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

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

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-07-05 06:02 Opened: 2006-06-05 09:55
$ cat foobar.c
union u {
        struct {
                int i;
        };
};

extern int somefunc(union u *);
$ gcc --combine -c foobar.c foobar.c
foobar.c:8: error: conflicting types for 'somefunc'
foobar.c:8: error: previous declaration of 'somefunc' was here

gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)

Happens on both PowerPC and i386. If the internal structure is made
non-anonymous, it compiles.

------- Comment #1 From Alexandre Oliva 2006-07-05 06:04 -------
Created an attachment (id=11822) [edit]
Patch that fixes the bug

This patch fixes the problem for me.

------- Comment #2 From patchapp@dberlin.org 2006-07-06 03:45 -------
Subject: Bug number PR27898

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00187.html

------- Comment #3 From David Woodhouse 2006-08-13 10:30 -------
That simple test case seems to have been fixed with your patch -- thanks.
Next failure reported as PR28706.

Full test cases in Red Hat bug #194327 at
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194327

------- Comment #4 From Alexandre Oliva 2007-11-26 06:26 -------
Subject: Bug 27898

Author: aoliva
Date: Mon Nov 26 06:26:18 2007
New Revision: 130425

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130425
Log:
PR c/27898
* c-typeck.c (tagged_types_tu_compatible_p): Enable exact
matches between anonymous union fields.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-typeck.c

------- Comment #5 From Alexandre Oliva 2007-11-26 16:24 -------
Fixed.

------- Comment #6 From uros@gcc.gnu.org 2009-03-25 07:59 -------
Subject: Bug 27898

Author: uros
Date: Wed Mar 25 07:58:55 2009
New Revision: 145052

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145052
Log:
        PR c/27898
        * gcc.dg/pr27898.c: New test.

        PR tree-optimization/32139
        * gcc.c-torture/compile/pr32139.c: New test.


Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr32139.c
    trunk/gcc/testsuite/gcc.dg/pr27898.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog

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