https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65817

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
Created attachment 35368
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35368&action=edit
GDB patch

GDB patch to crash GCC.

together with:
cat >1.c <<EOH
// b tree.c:build_qualified_type
// p TYPE_SIZE (type)
volatile struct sv { volatile struct sv *p; } sv; // CRASH: compile code sv.p =
&sv;
volatile struct s { int i; } s, *sp; // OK: compile code sp = &s;
int main(void) { return 0; }
EOH
gcc -o 1 1.c -Wall -g;noGDBHOOK=1
PATH="/home/jkratoch/redhat/gccgitatsign-root/bin:$PATH"
LD_LIBRARY_PATH=/home/jkratoch/redhat/gccgitatsign-root/lib64 ../gdb ./1 -ex
start -ex 'set debug compile 0' -ex 'compile code sv.p = &sv;printf("%p
%p\n",&sv,sv.p);'

Reply via email to