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
This commit is contained in:
ngoto 2017-04-14 19:12:51 +00:00
Родитель db2822a5bc
Коммит f687a147eb
1 изменённых файлов: 2 добавлений и 2 удалений

4
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