[前][次][番号順一覧][スレッド一覧]

ruby-changes:6037

From: knu <ko1@a...>
Date: Mon, 23 Jun 2008 20:01:17 +0900 (JST)
Subject: [ruby-changes:6037] Ruby:r17547 (ruby_1_8): * eval.c (PUSH_FRAME, PUSH_CLASS): Add volatile to avoid a

knu	2008-06-23 20:01:00 +0900 (Mon, 23 Jun 2008)

  New Revision: 17547

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/eval.c

  Log:
    * eval.c (PUSH_FRAME, PUSH_CLASS): Add volatile to avoid a
      possible optimization bug on OS X/PPC.  This at least makes
      build with gcc -O1 and `make test' pass.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=17547&r2=17546&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/eval.c?r1=17547&r2=17546&diff_format=u

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 17546)
+++ ruby_1_8/ChangeLog	(revision 17547)
@@ -1,3 +1,9 @@
+Mon Jun 23 19:59:04 2008  Akinori MUSHA  <knu@i...>
+
+	* eval.c (PUSH_FRAME, PUSH_CLASS): Add volatile to avoid a
+	  possible optimization bug on OS X/PPC.  This at least makes
+	  build with gcc -O1 and `make test' pass.
+
 Mon Jun 23 11:17:24 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* Makefile.in, common.mk, {win,bcc}32/Makefile.sub (revision.h): auto
Index: ruby_1_8/eval.c
===================================================================
--- ruby_1_8/eval.c	(revision 17546)
+++ ruby_1_8/eval.c	(revision 17547)
@@ -758,7 +758,7 @@
 static unsigned long frame_unique = 0;
 
 #define PUSH_FRAME() do {		\
-    struct FRAME _frame;		\
+    volatile struct FRAME _frame;	\
     _frame.prev = ruby_frame;		\
     _frame.tmp  = 0;			\
     _frame.node = ruby_current_node;	\
@@ -1055,7 +1055,7 @@
 static VALUE ruby_wrapper;	/* security wrapper */
 
 #define PUSH_CLASS(c) do {		\
-    VALUE _class = ruby_class;		\
+    volatile VALUE _class = ruby_class;	\
     ruby_class = (c)
 
 #define POP_CLASS() ruby_class = _class; \

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]