ruby-changes:46243
From: ngoto <ko1@a...>
Date: Sat, 15 Apr 2017 04:13:05 +0900 (JST)
Subject: [ruby-changes:46243] ngoto:r58358 (trunk): Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5
ngoto 2017-04-15 04:12:51 +0900 (Sat, 15 Apr 2017) New Revision: 58358 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58358 Log: Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5 * pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5 (Oracle Developer Studio 12.5) on Solaris with -xO4 optimization option. [Bug #11684] [ruby-core:80690] Modified files: trunk/pack.c Index: pack.c =================================================================== --- pack.c (revision 58357) +++ pack.c (revision 58358) @@ -1011,10 +1011,10 @@ hex2num(char c) https://github.com/ruby/ruby/blob/trunk/pack.c#L1011 rb_ary_store(ary, RARRAY_LEN(ary)+tmp_len-1, Qnil); \ } while (0) -/* Workaround for Oracle Solaris Studio 12.4 C compiler optimization bug +/* Workaround for Oracle Solaris Studio 12.4/12.5 C compiler optimization bug * with "-xO4" optimization option. */ -#if defined(__SUNPRO_C) && __SUNPRO_C == 0x5130 +#if defined(__SUNPRO_C) && 0x5130 <= __SUNPRO_C && __SUNPRO_C <= 0x5140 # define AVOID_CC_BUG volatile #else # define AVOID_CC_BUG -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/