On Fri, Apr 14, 2017 at 07:00:06PM -0700, Paul Eggert wrote: > On 04/14/2017 02:27 PM, Gavin Smith wrote: > > /opt/solarisstudio12.3/bin/c99 -Xc -D_XPG6 -DHAVE_CONFIG_H -I. -I../.. > > -D_REENTRANT -I/opt/csw/include -c -o regex.o regex.c > > "regex_internal.h", line 105: warning: macro redefined: gettext > > That's odd. Where was the gettext macro originally defined?
/opt/csw/include/libintl.h, line 132: #define gettext libintl_gettext (I got this using the -xdumpmacros=defs,loc option.) > > Assembler: "/tmp/yabeAAAiUaidC", line 19010 : Value out of range > > "/tmp/yabeAAAiUaidC", line 19031 : Value out of range > > Ouch. This appears to be a compiler bug, as a compiler should never generate > invalid assembly-language code. I cannot reproduce the problem on Solaris 10 > sparc (32-bit) with Oracle Developer Studio 12.5. You are on Solaris 10 x86 > (32-bit) and are using 12.3. Do you observe the same compiler bug with > 12.5 or 12.6 beta? If so, I suggest reporting it as a bug to Oracle. I only have access to 12.4 on the system I am using, but that appears to compile the test file I posted without error. Solaris Studio 12.2 gives the same error as 12.3. > What happens if you compile with -xO2? The errors from the assembler do not occur and the compilation finishes successfully. > > Although I cannot reproduce the problem in my environment, I think I see why > it's happening. I installed the attached patches into Gnulib; do they fix > your problem? Yes, the error goes away with the change you made. It's good that you managed to fix this.