Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal compiler error when compile CRuby project #20890

Closed
2 of 7 tasks
nekoyama32767 opened this issue May 13, 2024 · 2 comments
Closed
2 of 7 tasks

Internal compiler error when compile CRuby project #20890

nekoyama32767 opened this issue May 13, 2024 · 2 comments

Comments

@nekoyama32767
Copy link

nekoyama32767 commented May 13, 2024

Description / Steps to reproduce the issue

In Mingw64 shell
Follow CRuby build guide in https://github.com/ruby/ruby
Some file linke numerc.c whill produce a internal compiler error when enble option -fno-omit-frame-pointer
However, without -fno-omit-frame-pointer compile will pass.

gcc version is

$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 14.1.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And I have run pacman -Syyu

CPU: I9-14900HX

Expected behavior

No error will be produced

Actual behavior

I use the option in CRuby project Makefile, manually compile with cc

 cc -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x64-mingw32 -I./include -I. -I./prism -I./enc/unicode/15.0.0 -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -c numeric.c -fno-omit-frame-pointer -freport-bug -v -save-temps
Using built-in specs.
COLLECT_GCC=D:\msys64\mingw64\bin\cc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-14.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,rust,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev2, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --enable-plugin --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.0 (Rev2, Built by MSYS2 project)
COLLECT_GCC_OPTIONS='-fstack-protector-strong' '-fno-strict-overflow' '-fvisibility=hidden' '-fexcess-precision=standard' '-D' 'RUBY_EXPORT' '-I' '.' '-I' '.ext/include/x64-mingw32' '-I' './include' '-I' '.' '-I' './prism' '-I' './enc/unicode/15.0.0' '-O3' '-fno-fast-math' '-ggdb3' '-Wall' '-Wextra' '-Wdeprecated-declarations' '-Wdiv-by-zero' '-Wduplicated-cond' '-Wimplicit-function-declaration' '-Wimplicit-int' '-Wpointer-arith' '-Wwrite-strings' '-Wold-style-definition' '-Wimplicit-fallthrough=0' '-Wno-cast-function-type' '-Wno-constant-logical-operand' '-Wno-long-long' '-Wno-missing-field-initializers' '-Wno-overlength-strings' '-Wno-packed-bitfield-compat' '-Wno-parentheses-equality' '-Wno-self-assign' '-Wno-tautological-compare' '-Wno-unused-parameter' '-Wno-unused-value' '-Wsuggest-attribute=format' '-Wsuggest-attribute=noreturn' '-Wunused-variable' '-Wmisleading-indentation' '-Wundef' '-D' '_WIN32_WINNT=0x0600' '-D' '__MINGW_USE_VC2005_COMPAT' '-c' '-fno-omit-frame-pointer' '-freport-bug' '-v' '-save-temps' '-mtune=generic' '-march=nocona'
 D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/cc1.exe -E -quiet -v -I . -I .ext/include/x64-mingw32 -I ./include -I . -I ./prism -I ./enc/unicode/15.0.0 -iprefix D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/ -dD -D_REENTRANT -D RUBY_EXPORT -D _WIN32_WINNT=0x0600 -D __MINGW_USE_VC2005_COMPAT numeric.c -mtune=generic -march=nocona -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -fno-fast-math -fno-omit-frame-pointer -freport-bug -ggdb3 -fworking-directory -O3 -fpch-preprocess -o numeric.i
ignoring nonexistent directory "D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/include"
ignoring duplicate directory "D:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/14.1.0/include"
ignoring nonexistent directory "D:/a/msys64/mingw64/include"
ignoring nonexistent directory "/mingw64/include"
ignoring duplicate directory "D:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/14.1.0/include-fixed"
ignoring nonexistent directory "D:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "D:/a/msys64/mingw64/include"
ignoring duplicate directory "."
ignoring nonexistent directory "./prism"
#include "..." search starts here:
#include <...> search starts here:
 .
 .ext/include/x64-mingw32
 ./include
 ./enc/unicode/15.0.0
 D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/include
 D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../include
 D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/include-fixed
End of search list.
COLLECT_GCC_OPTIONS='-fstack-protector-strong' '-fno-strict-overflow' '-fvisibility=hidden' '-fexcess-precision=standard' '-D' 'RUBY_EXPORT' '-I' '.' '-I' '.ext/include/x64-mingw32' '-I' './include' '-I' '.' '-I' './prism' '-I' './enc/unicode/15.0.0' '-O3' '-fno-fast-math' '-ggdb3' '-Wall' '-Wextra' '-Wdeprecated-declarations' '-Wdiv-by-zero' '-Wduplicated-cond' '-Wimplicit-function-declaration' '-Wimplicit-int' '-Wpointer-arith' '-Wwrite-strings' '-Wold-style-definition' '-Wimplicit-fallthrough=0' '-Wno-cast-function-type' '-Wno-constant-logical-operand' '-Wno-long-long' '-Wno-missing-field-initializers' '-Wno-overlength-strings' '-Wno-packed-bitfield-compat' '-Wno-parentheses-equality' '-Wno-self-assign' '-Wno-tautological-compare' '-Wno-unused-parameter' '-Wno-unused-value' '-Wsuggest-attribute=format' '-Wsuggest-attribute=noreturn' '-Wunused-variable' '-Wmisleading-indentation' '-Wundef' '-D' '_WIN32_WINNT=0x0600' '-D' '__MINGW_USE_VC2005_COMPAT' '-c' '-fno-omit-frame-pointer' '-freport-bug' '-v' '-save-temps' '-mtune=generic' '-march=nocona'
 D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/cc1.exe -fpreprocessed numeric.i -quiet -dumpbase numeric.c -dumpbase-ext .c -mtune=generic -march=nocona -ggdb3 -O3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef -version -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -fno-fast-math -fno-omit-frame-pointer -freport-bug -o numeric.s
GNU C17 (Rev2, Built by MSYS2 project) version 14.1.0 (x86_64-w64-mingw32)
        compiled by GNU C version 14.1.0, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 5c0563498f0d9b76f02a2fd8c187e7d7
during RTL pass: dwarf2
numeric.c: In function 'rb_float_new_in_heap':
numeric.c:1034:1: internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2cfi.cc:2112
 1034 | }
      | ^
Please submit a full bug report, with preprocessed source.
See <https://github.com/msys2/MINGW-packages/issues> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.

Verification

Windows Version

MSYS_NT-10.0-22631

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Are you willing to submit a PR?

No response

@lazka
Copy link
Member

lazka commented May 13, 2024

@nekoyama32767 please try again now after updating. #20884 has landed in the repo just now.

@nekoyama32767
Copy link
Author

Thanks, Seems it has fixed the ICE.

@Biswa96 Biswa96 closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants