https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912
--- Comment #3 from Witold Krecicki ---
It seems to be a bad interaction between GCC and Solaris linker, with GNU ld it
works correctly on all optimization levels - gcc -v below. Unfortunately gcc
shipped with Solaris is using Solaris linker.
``
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912
--- Comment #2 from Witold Krecicki ---
I was able to reproduce it on fresh build of gcc 9.1.0:
Using built-in specs.
COLLECT_GCC=/usr/gcc/9/bin/gcc
COLLECT_LTO_WRAPPER=/usr/gcc/9/lib/gcc/x86_64-pc-solaris2.11/9.1.0/lto-wrapper
Target: x86_64-pc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912
--- Comment #1 from Witold Krecicki ---
Created attachment 46498
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46498&action=edit
Minimal testcase
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: wpk at culm dot net
Target Milestone: ---
Created attachment 46497
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46497&action=edit
Prepr
NCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: wpk at culm dot net
For following code:
typedef unsigned char Bar[12];
void foo(Bar *bar) {}
void fooconst(const Bar *bar) {}
compiled with gcc -g