Issue #4566 has been updated by jojelino lastname.


>>The patch seems wrong: first is the way check the gcc version, and the condition also wrong.

the definitive solution would be leaving only following line

#define DECL_SC_REG(type, r, reg) register type reg_##r

>>I doubt that this bug is reproduced only on mingw32.

to be honest, it doesn't be reproduced without -O flag. sure it was mingw32.

so i would like to say %edi & %esi is now clobbered for >=gcc 4.6 with optimization option 
enabled.
----------------------------------------
Bug #4566: followup of [ruby-core:32747] 
http://redmine.ruby-lang.org/issues/4566

Author: jojelino lastname
Status: Open
Priority: High
Assignee: 
Category: core
Target version: 1.9.3
ruby -v: revision 31234


[ruby-core:32747]

 Index: vm_exec.c
 ===================================================================
 --- vm_exec.c   (revision 31234)
 +++ vm_exec.c   (working copy)
 @@ -11,7 +11,7 @@
 
 #include <math.h>
 
 -#if VMDEBUG > 0
 +#if (VMDEBUG > 0) | ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 6) && (__GNUC_PATCHLEVEL__ >= 0))
 #define DECL_SC_REG(type, r, reg) register type reg_##r
 
 #elif __GNUC__ && __x86_64__ && !__clang__

please apply this, it resolves segmentation fault in gcc > 4.6 
specifying register name explicitly fails. although it worked in previous version.
if you continue using explicit register name, you gotta find workaround about it ;)


-- 
http://redmine.ruby-lang.org