Project

General

Profile

Actions

Bug #11979

closed

gcc-6 fails to optimize regcomp.c:compile_length_quantifier_node()

Added by t-nissie (Takeshi Nishimatsu) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:72819]

Description

This may be a GCC version specific issue.
gcc-6, an experimental snapshot from http://ftp.tsukuba.wide.ad.jp/software/gcc/snapshots/6-20160110/ ,
fails to compile ruby-2.2.4 and ruby-2.3.0 with an error of
template/encdb.h.tmpl:63:in `block (4 levels) in ': x_emoji.h:8: ENC_REPLICATE: UTF-8 is not defined yet. (replica UTF8-DoCoMo) (ArgumentError) .
I confirmed it both on Linux and Mac OS X.

gcc-4.9.2 could compile ruby-2.3.0.
/usr/bin/gcc of Mac OS X (Apple LLVM version 7.0.2 (clang-700.1.81)) could compile ruby-2.3.0, too.

Maybe, I should report it to https://gcc.gnu.org/bugzilla/ .
Could you tell me how to make small reproducible code?
(Or, please report it to the bugzilla with small code ;-)

Compile log:

$ uname -a
Linux emerald01 2.6.32-573.12.1.el6.x86_64 #1 SMP Tue Dec 15 21:19:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ tar xf ruby-2.3.0.tar.xz
$ mkdir ruby-2.3.0/Linux-x86_64-gcc-6-20160110-emerald01
$ cd    ruby-2.3.0/Linux-x86_64-gcc-6-20160110-emerald01
$ pwd
$ ../configure
$ make -j16
$ make
$ make V=1
	CC = gcc
	LD = ld
	LDSHARED = gcc -shared
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -std=iso9899:1999
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
	CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I../include -I..
	DLDFLAGS = -fstack-protector -pie
	SOLIBS = -lgmp
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --enable-languages=c,c++,fortran,go,objc --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib64 --with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib64 --with-mpc-include=/usr/local/include --with-mpc-lib=/usr/local/lib64
Thread model: posix
gcc version 6.0.0 20160110 (experimental) (GCC)
./miniruby -I../lib -I. -I.ext/common  ../enc/make_encmake.rb --builtin-encs="enc/ascii.o enc/us_ascii.o enc/unicode.o enc/utf_8.o" --builtin-transes="enc/trans/newline.o" --module  enc.mk
./miniruby -I../lib -I. -I.ext/common  ../tool/generic_erb.rb -c -o encdb.h ../template/encdb.h.tmpl ../enc enc
../template/encdb.h.tmpl:63:in `block (4 levels) in <main>': x_emoji.h:8: ENC_REPLICATE: UTF-8 is not defined yet. (replica UTF8-DoCoMo) (ArgumentError)
	from ../template/encdb.h.tmpl:43:in `each_line'
	from ../template/encdb.h.tmpl:43:in `block (3 levels) in <main>'
	from ../template/encdb.h.tmpl:41:in `open'
	from ../template/encdb.h.tmpl:41:in `block (2 levels) in <main>'
	from ../template/encdb.h.tmpl:38:in `each'
	from ../template/encdb.h.tmpl:38:in `block in <main>'
	from ../template/encdb.h.tmpl:34:in `each'
	from ../template/encdb.h.tmpl:34:in `<main>'
	from /home002/t-nissie/COMMON/work/ruby/ruby/ruby-2.3.0/lib/erb.rb:864:in `eval'
	from /home002/t-nissie/COMMON/work/ruby/ruby/ruby-2.3.0/lib/erb.rb:864:in `result'
	from ../tool/generic_erb.rb:38:in `<main>'
make: *** [encdb.h] Error 1

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #11831: Undefined behavior issuesClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0