From f687a147ebd7ef029a9b95d599cebabbc04bbf1c Mon Sep 17 00:00:00 2001 From: ngoto Date: Fri, 14 Apr 2017 19:12:51 +0000 Subject: 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pack.c') diff --git a/pack.c b/pack.c index d2f67c73f2..7ae62d2ace 100644 --- a/pack.c +++ b/pack.c @@ -1011,10 +1011,10 @@ hex2num(char c) 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 -- cgit v1.2.3