Commit a844a60b by Richard Guenther Committed by Richard Biener

re PR c++/44871 (Invalid type mismatches while merging C and C++ sources)

2010-12-02  Richard Guenther  <rguenther@suse.de>

	PR lto/44871
	* gimple.c (canonical_type_hash_cache): New hashtable.
	(gimple_type_hash): Make a wrapper around ...
	(gimple_type_hash_1): ... this.  Take gtc_mode argument.
	(gimple_canonical_type_hash): Likewise.
	(gtc_visit): Take a gtc_mode argument.
	(gimple_types_compatible_p_1): Likewise. Do not compare struct
	tag names or field names when computing canonical types.
	(gimple_types_compatible_p): Adjust.
	(visit): Take a gtc_mode argument.
	(iterative_hash_gimple_type): Likewise.  Do not hash struct tag
	names or field names when computing hashes of canonical types.
	(gimple_register_canonical_type): Use gimple_canonical_type_hash
	for the hash.
	(print_gimple_types_stats): Dump stats of canonical_type_hash_cache.
	(free_gimple_type_tables): Free canonical_type_hash_cache.

	* g++.dg/lto/20101126-1_0.C: New testcase.
	* g++.dg/lto/20101126-1_1.c: Likewise.

From-SVN: r167367
parent 52bd463c
2010-12-02 Richard Guenther <rguenther@suse.de>
PR lto/44871
* gimple.c (canonical_type_hash_cache): New hashtable.
(gimple_type_hash): Make a wrapper around ...
(gimple_type_hash_1): ... this. Take gtc_mode argument.
(gimple_canonical_type_hash): Likewise.
(gtc_visit): Take a gtc_mode argument.
(gimple_types_compatible_p_1): Likewise. Do not compare struct
tag names or field names when computing canonical types.
(gimple_types_compatible_p): Adjust.
(visit): Take a gtc_mode argument.
(iterative_hash_gimple_type): Likewise. Do not hash struct tag
names or field names when computing hashes of canonical types.
(gimple_register_canonical_type): Use gimple_canonical_type_hash
for the hash.
(print_gimple_types_stats): Dump stats of canonical_type_hash_cache.
(free_gimple_type_tables): Free canonical_type_hash_cache.
2010-12-02 Richard Guenther <rguenther@suse.de>
Ira Rosen <irar@il.ibm.com>
PR tree-optimization/46663
2010-12-02 Richard Guenther <rguenther@suse.de>
PR lto/44871
* g++.dg/lto/20101126-1_0.C: New testcase.
* g++.dg/lto/20101126-1_1.c: Likewise.
2010-12-02 Richard Guenther <rguenther@suse.de>
Ira Rosen <irar@il.ibm.com>
PR tree-optimization/46663
......
typedef struct { int i; } T1;
typedef T1 T2;
extern T1 a;
extern T2 b;
int main() { return a.i + b.i; }
typedef struct { int i; } T1;
typedef T1 T2;
T1 a;
T2 b;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment