Project

General

Profile

Actions

Bug #6971

closed

r36832 breaks test/mkmf/test_convertible.rb

Added by vo.x (Vit Ondruch) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-09-03 trunk 36887) [x86_64-linux]
Backport:
[ruby-core:47406]

Description

make test-all TESTS=test/mkmf/test_convertible.rb

CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64
XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I.
DLDFLAGS = -Wl,-soname,libruby.so.2.0 -fstack-protector  -m64
SOLIBS = -lpthread -lrt -ldl -lcrypt -lm  

./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" test/mkmf/test_convertible.rb
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems"

Running tests:

[1/2] TestMkmf::TestConvertible#test_typeof_builtin = 0.42 s

  1. Failure:
    test_typeof_builtin(TestMkmf::TestConvertible) [/builddir/build/BUILD/ruby-2.0.0-r36887/test/mkmf/test_convertible.rb:8]:
    convertible_int: checking for convertible type of short... -------------------- short

convertible_int: checking for convertible type of int... -------------------- int


convertible_int: checking for convertible type of long... -------------------- long


convertible_int: checking for convertible type of signed short... -------------------- failed

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: int main(void) {return 0;}
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: /top/
6: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
conftest.c: At top level:
conftest.c:6:12: error: conflicting types for ‘foo’
conftest.c:5:22: note: previous declaration of ‘foo’ was here
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern int foo();
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern short foo();
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
conftest.c: At top level:
conftest.c:6:13: error: conflicting types for ‘foo’
conftest.c:5:22: note: previous declaration of ‘foo’ was here
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern long foo();
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
conftest.c: At top level:
conftest.c:6:18: error: conflicting types for ‘foo’
conftest.c:5:22: note: previous declaration of ‘foo’ was here
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern long long foo();
/
end */


.
<"short"> expected but was
.

[2/2] TestMkmf::TestConvertible#test_typeof_typedef = 0.33 s
2) Failure:
test_typeof_typedef(TestMkmf::TestConvertible) [/builddir/build/BUILD/ruby-2.0.0-r36887/test/mkmf/test_convertible.rb:21]:
convertible_int: checking for convertible type of test1_t... -------------------- failed

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #include <confdefs.h>
4: typedef test1_t rbcv_typedef_;
5:
6: /top/
7: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
conftest.c: At top level:
conftest.c:8:12: error: conflicting types for ‘foo’
conftest.c:7:22: note: previous declaration of ‘foo’ was here
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #include <confdefs.h>
4:
5: typedef test1_t rbcv_typedef_;
6:
7: extern rbcv_typedef_ foo();
8: extern int foo();
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #include <confdefs.h>
4:
5: typedef test1_t rbcv_typedef_;
6:
7: extern rbcv_typedef_ foo();
8: extern short foo();
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
conftest.c: At top level:
conftest.c:8:13: error: conflicting types for ‘foo’
conftest.c:7:22: note: previous declaration of ‘foo’ was here
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #include <confdefs.h>
4:
5: typedef test1_t rbcv_typedef_;
6:
7: extern rbcv_typedef_ foo();
8: extern long foo();
/
end */

In file included from /builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby.h:33:0,
from conftest.c:1:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h: In function ‘rb_float_value’:
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
/builddir/build/BUILD/ruby-2.0.0-r36887/include/ruby/ruby.h:746:6: error: suggest parentheses around arithmetic in operand of ‘|’ [-Werror=parentheses]
conftest.c: At top level:
conftest.c:8:18: error: conflicting types for ‘foo’
conftest.c:7:22: note: previous declaration of ‘foo’ was here
cc1: all warnings being treated as errors
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: #include <confdefs.h>
4:
5: typedef test1_t rbcv_typedef_;
6:
7: extern rbcv_typedef_ foo();
8: extern long long foo();
/
end */


.
<"short"> expected but was
.

Finished tests in 0.757810s, 2.6392 tests/s, 6.5980 assertions/s.
2 tests, 5 assertions, 2 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0dev (2012-09-03 trunk 36887) [x86_64-linux]
make: *** [yes-test-all] Error 2

It works just fine when reverting the patch. Testing with Fedora Rawhide.

rpm -q gcc

gcc-4.7.1-7.fc19.x86_64

Actions

Also available in: Atom PDF

Like0
Like0