Bug 33977 - [4.3 Regression] internal compiler error: canonical types differ for identical types const char [5] and const sal_Char [5]
Summary: [4.3 Regression] internal compiler error: canonical types differ for identica...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P1 normal
Target Milestone: 4.3.0
Assignee: dgregor
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-11-01 22:40 UTC by bero
Modified: 2007-11-06 14:40 UTC (History)
4 users (show)

See Also:
Host: i586-pc-linux-gnu
Target: i586-pc-linux-gnu
Build: i586-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2007-11-05 15:13:00


Attachments
bzip2-ed preprocessed source (149.15 KB, application/x-bzip2)
2007-11-01 22:43 UTC, bero
Details
Reduced test case (67 bytes, text/x-c++src)
2007-11-01 22:56 UTC, bero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bero 2007-11-01 22:40:22 UTC
/usr/src/ark/BUILD/ooo-build/build/oog680-m7/sw/source/ui/uno/swdet2.cxx: At global scope:
/usr/src/ark/BUILD/ooo-build/build/oog680-m7/sw/source/ui/uno/swdet2.cxx:91: internal compiler error: canonical types differ for identical types const char [5] and const sal_Char [5]

This is similar to bug 33886, may be just another test case for the same bug:
Comment 1 bero 2007-11-01 22:43:30 UTC
Created attachment 14461 [details]
bzip2-ed preprocessed source
Comment 2 bero 2007-11-01 22:45:03 UTC
Difference from bug 33886: bug 33977 occurs even at -O0, 33866 needs -O2
Comment 3 bero 2007-11-01 22:56:16 UTC
Created attachment 14462 [details]
Reduced test case

typedef char sal_Char;
const sal_Char sHTML[] = "HTML";
extern const char sHTML[];
Comment 4 dgregor 2007-11-06 14:39:59 UTC
Subject: Bug 33977

Author: dgregor
Date: Tue Nov  6 14:39:41 2007
New Revision: 129929

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129929
Log:
2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33977
	PR c++/33886
	* tree.c (c_build_qualified_type): Define bridge to
	cp_build_qualified_type.

2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33977
	PR c++/33886
	* c-common.c (c_build_qualified_type): Moved to c-typeck.c.
	(complete_array_type): Set canonical type appropriately.
	* c-typeck.c (c_build_qualified_type): Moved from c-common.c. The
	C and C++ front ends now have different versions of this function,
	because the C++ version needs to maintain canonical types here.

2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33977
	PR c++/33886
	* g++.dg/other/canon-array.C: New.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/c-typeck.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/testsuite/ChangeLog

Comment 5 dgregor 2007-11-06 14:40:40 UTC
Fixed