old-cross-binutils/gdb/testsuite/gdb.compile
Jan Kratochvil 084641963d compile: Warn for old GCC on cv-qualified self-reference
GDB could:

compile code struct_object.selffield = &struct_object
./compile/compile-c-types.c:83: internal-error: insert_type: Assertion `add == NULL || add->gcc_type == gcc_type' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) FAIL: gdb.compile/compile.exp: compile code struct_object.selffield = &struct_object (GDB internal
error)

The bug was not in GDB but in the GCC part interfacing with GDB.

Alexandre Oliva has fixed it the right way:
	https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=commitdiff;h=072dfdba0ea62abb65514cb3a90cdf3868efe286
	git://gcc.gnu.org/git/gcc.git
	aoliva/libcp1

Attaching this GDB testsuite update + info to user s/he should upgrade GCC.
After Alex upstreams the fix I can update the message to contain the specific
GCC release.

gdb/ChangeLog
2015-07-08  Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR compile/18484
	* compile/compile-c-types.c (insert_type): Change gdb_assert to error.

gdb/testsuite/ChangeLog
2015-07-08  Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR compile/18484
	* gdb.compile/compile.c (struct struct_type): Add volatile to
	selffield's type.
	* gdb.compile/compile.exp
	(compile code struct_object.selffield = &struct_object): Skip further
	struct_object tests if this one xfails.
2015-07-08 14:42:19 +02:00
..
compile-constvar.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-constvar.S Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-ifunc.c compile: Fix GNU-IFUNC funcs called from injected code 2015-02-26 17:40:57 +01:00
compile-ifunc.exp compile: Fix GNU-IFUNC funcs called from injected code 2015-02-26 17:40:57 +01:00
compile-mod.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-nodebug.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-ops.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-ops.exp compile: Use -Wall, not -w 2015-05-16 14:39:59 +02:00
compile-print.c compile: New 'compile print' 2015-05-16 14:45:06 +02:00
compile-print.exp compile-print.exp: xfail->kfail for '@' GDB array operator 2015-06-04 21:35:43 +02:00
compile-setjmp-mod.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-setjmp.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-setjmp.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-shlib.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-tls.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile-tls.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
compile.c compile: Warn for old GCC on cv-qualified self-reference 2015-07-08 14:42:19 +02:00
compile.exp compile: Warn for old GCC on cv-qualified self-reference 2015-07-08 14:42:19 +02:00
Makefile.in