[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #21 from Whitequill Riclo whitequill at abstractions dot me --- The patch worked for me, but now I'm getting a new error that looks like Bug 47052 accept the proposed fix doesn't work because is says DW2 isn't suppored on 64-bit yet. I can get around this if I change --enable-languages=c,c++ to --enable-languages=c, but I don't really want to, cause then I don't have a c++ compiler. checking whether the /home/lfs/build.gcc1/./gcc/xgcc -shared-libgcc -B/home/lfs/build.gcc1/./gcc -nostdinc++ -L/home/lfs/build.gcc1/x86_64-w64-mingw32/libstdc++-v3/src -L/home/lfs/build.gcc1/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/tools/x86_64-w64-mingw32/lib -L/tools/mingw/lib -isystem /tools/x86_64-w64-mingw32/include -isystem /tools/mingw/include -B/tools/x86_64-w64-mingw32/bin/ -B/tools/x86_64-w64-mingw32/lib/ -isystem /tools/x86_64-w64-mingw32/include -isystem /tools/x86_64-w64-mingw32/sys-includelinker (/home/lfs/build.gcc1/./gcc/collect-ld) supports shared libraries... yes checking dynamic linker characteristics... Win32 ld.exe checking how to hardcode library paths into programs... immediate checking for exception model to use... call frame checking for compiler with PCH support... yes checking for enabled PCH... yes checking for thread model used by GCC... single checking for atomic builtins for bool... yes checking for atomic builtins for short... yes checking for atomic builtins for int... yes checking for atomic builtins for long long... yes checking for ISO/IEC TR 24733 ... no checking for __int128... yes checking for __float128... yes checking for g++ that supports -ffunction-sections -fdata-sections... yes checking for underlying I/O to use... stdio checking for C locale to use... generic checking for std::allocator base class... new configure: C header strategy set to c_global checking for enabled long long specializations... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking for mbstate_t... yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking for enabled wchar_t specializations... yes checking for ISO C99 support in math.h... yes checking tgmath.h usability... yes checking tgmath.h presence... yes checking for tgmath.h... yes checking complex.h usability... yes checking complex.h presence... yes checking for complex.h... yes checking for ISO C99 support in complex.h... yes checking for ISO C99 support in stdio.h... yes checking for ISO C99 support in stdlib.h... yes checking for ISO C99 support in wchar.h... yes checking for fully enabled ISO C99 support... yes configure: Debug build flags set to -gdwarf-4 -g3 -O0 checking for additional debug build... no configure: target-libgomp not built checking for parallel mode support... no checking for extra compiler flags for building... checking for extern template support... yes checking for custom python install directory... no checking for -Werror... yes checking for gets declaration... yes checking for EOWNERDEAD... no checking for ENOTRECOVERABLE... no checking for ENOLINK... no checking for EPROTO... no checking for ENODATA... no checking for ENOSR... no checking for ENOSTR... no checking for ETIME... no checking for EBADMSG... no checking for ECANCELED... no checking for EOVERFLOW... no checking for ENOTSUP... no checking for EIDRM... no checking for ETXTBSY... no checking for ECHILD... yes checking for ENOSPC... yes checking for EPERM... yes checking for ETIMEDOUT... no checking for EWOULDBLOCK... no checking for int64_t... yes checking for int64_t as long... checking for int64_t as long long... yes checking for LFS support... yes checking sys/ioctl.h usability... no checking sys/ioctl.h presence... no checking for sys/ioctl.h... no checking sys/filio.h usability... no checking sys/filio.h presence... no checking for sys/filio.h... no checking for poll... no checking for S_ISREG or S_IFREG... S_ISREG checking sys/uio.h usability... no checking sys/uio.h presence... no checking for sys/uio.h... no checking for writev... no checking for complex.h... (cached) yes checking for ISO C99 support to TR1 in complex.h... yes checking for ISO C99 support to TR1 in ctype.h... yes checking fenv.h usability... yes checking fenv.h presence... yes checking for fenv.h... yes checking for ISO C99 support to TR1 in fenv.h... yes checking for ISO C99 support to TR1 in stdint.h... yes checking for ISO C99 support to TR1 in math.h... yes checking for ISO C99 support to TR1 in inttypes.h... yes checking for wchar_t ISO C99 support to TR1 in inttypes.h... yes checking stdbool.h usability... yes checking stdbool.h presence... yes checking for stdbool.h... yes checking stdalign.h usability... yes checking stdalign.h presence... yes checking for stdalign.h... yes checking for the value of EOF... -1 checking for the value of SEEK_CUR... 1 checking for the value of SEEK_END... 2 checking for
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #22 from Kai Tietz ktietz at gcc dot gnu.org --- Author: ktietz Date: Fri Sep 13 17:28:25 2013 New Revision: 202572 URL: http://gcc.gnu.org/viewcvs?rev=202572root=gccview=rev Log: PR target/57848 * c-decl.c (c_builtin_function_ext_scope): Remove wrong assumption that it is never called on prexisting symbol. Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-decl.c
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 Kai Tietz ktietz at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #23 from Kai Tietz ktietz at gcc dot gnu.org --- So issue concerning this bug is fixed. I close this bug.
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #14 from Dongsheng Song dongsheng.song at gmail dot com --- Created attachment 30804 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30804action=edit 32 bit gcc 4.9 build errors
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #15 from Dongsheng Song dongsheng.song at gmail dot com --- Yes,it helps, 64 bit gcc 4.9 build fine. but 32 bit failed with lots of 'conflicting types' errors, this maybe another story. $ svn info mingw-w64/trunk/ Path: mingw-w64/trunk URL: svn://svn.code.sf.net/p/mingw-w64/code/trunk Repository Root: svn://svn.code.sf.net/p/mingw-w64/code Repository UUID: 4407c894-4637-0410-b4f5-ada5f102cad1 Revision: 6277 Node Kind: directory Schedule: normal Last Changed Author: snarfle Last Changed Rev: 6277 Last Changed Date: 2013-09-12 03:13:55 +0800 (Thu, 12 Sep 2013) $ svn info gcc/trunk/ Path: gcc/trunk URL: svn://gcc.gnu.org/svn/gcc/trunk Repository Root: svn://gcc.gnu.org/svn/gcc Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4 Revision: 202515 Node Kind: directory Schedule: normal Last Changed Author: amodra Last Changed Rev: 202515 Last Changed Date: 2013-09-12 10:47:05 +0800 (Thu, 12 Sep 2013) $ svn diff gcc/trunk/gcc/c/c-decl.c Index: gcc/trunk/gcc/c/c-decl.c === --- gcc/trunk/gcc/c/c-decl.c(revision 202515) +++ gcc/trunk/gcc/c/c-decl.c(working copy) @@ -3604,7 +3604,7 @@ C_DECL_BUILTIN_PROTOTYPE (decl) = prototype_p (type); /* Should never be called on a symbol with a preexisting meaning. */ - gcc_assert (!I_SYMBOL_BINDING (id)); + gcc_assert (TREE_CODE (decl) == CONST_DECL || !I_SYMBOL_BINDING (id)); bind (id, decl, external_scope, /*invisible=*/true, /*nested=*/false, UNKNOWN_LOCATION); @@ -3629,9 +3629,6 @@ const char *name = IDENTIFIER_POINTER (id); C_DECL_BUILTIN_PROTOTYPE (decl) = prototype_p (type); - /* Should never be called on a symbol with a preexisting meaning. */ - gcc_assert (!I_SYMBOL_BINDING (id)); - bind (id, decl, external_scope, /*invisible=*/false, /*nested=*/false, UNKNOWN_LOCATION);
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #16 from Dongsheng Song dongsheng.song at gmail dot com --- Created attachment 30805 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30805action=edit 64 bit gcc 4.9 - cross to native build errors
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #17 from Jacek Caban jacek at codeweavers dot com --- (In reply to Dongsheng Song from comment #14) Created attachment 30804 [details] 32 bit gcc 4.9 build errors This has to be fixed in mingw-w64-headers. I will attach a draft of the patch for testing.
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #18 from Jacek Caban jacek at codeweavers dot com --- Created attachment 30806 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30806action=edit mingw-w64-headers intrins fix
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #19 from Dongsheng Song dongsheng.song at gmail dot com --- When I use this 64 bit gcc 4.9 cross compiler to generate the native compiler, I got the error: In file included from /home/cauchy/cross/x86_64-windows-gcc49/lib/gcc/x86_64-w64-mingw32/4.9.0/include/x86intrin.h:27:0, from /home/cauchy/cross/x86_64-windows-gcc49/x86_64-w64-mingw32/include/winnt.h:1495, from /home/cauchy/cross/x86_64-windows-gcc49/x86_64-w64-mingw32/include/minwindef.h:146, from /home/cauchy/cross/x86_64-windows-gcc49/x86_64-w64-mingw32/include/windef.h:8, from /home/cauchy/cross/x86_64-windows-gcc49/x86_64-w64-mingw32/include/windows.h:69, from /home/cauchy/vcs/svn/gcc/trunk/gcc/config/i386/host-mingw32.c:29: /home/cauchy/cross/x86_64-windows-gcc49/lib/gcc/x86_64-w64-mingw32/4.9.0/include/ia32intrin.h:54:28: sorry, unimplemented: -mno-fentry isn't compatible with SEH #pragma GCC target(sse4.2) ^ make[2]: *** [host-mingw32.o] Error 1 make[2]: Leaving directory `/home/cauchy/obj/native/gcc-4.9-win64/gcc/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/cauchy/obj/native/gcc-4.9-win64/gcc' make: *** [all] Error 2 The full error log file in the attachment 30835.
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #20 from Kai Tietz ktietz at gcc dot gnu.org --- (In reply to Jacek Caban from comment #18) Created attachment 30806 [details] mingw-w64-headers intrins fix Thanks Jacek for providing this work-a-round here, but I would like to ask Dongsheng not to hi-jack this bug for another one. See for Dongshengs subject-change the existing PR/56038. And well, this bug can be work-a-rounded by mingw-w64, but finally solved it can be only on gcc-side.
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #12 from Kai Tietz ktietz at gcc dot gnu.org --- Does the following patch helps to you? Index: c/c-decl.c === --- c/c-decl.c (Revision 202491) +++ c/c-decl.c (Arbeitskopie) @@ -3604,7 +3604,7 @@ c_builtin_function (tree decl) C_DECL_BUILTIN_PROTOTYPE (decl) = prototype_p (type); /* Should never be called on a symbol with a preexisting meaning. */ - gcc_assert (!I_SYMBOL_BINDING (id)); + gcc_assert (TREE_CODE (decl) == CONST_DECL || !I_SYMBOL_BINDING (id)); bind (id, decl, external_scope, /*invisible=*/true, /*nested=*/false, UNKNOWN_LOCATION); @@ -3629,9 +3629,6 @@ c_builtin_function_ext_scope (tree decl) const char *name = IDENTIFIER_POINTER (id); C_DECL_BUILTIN_PROTOTYPE (decl) = prototype_p (type); - /* Should never be called on a symbol with a preexisting meaning. */ - gcc_assert (!I_SYMBOL_BINDING (id)); - bind (id, decl, external_scope, /*invisible=*/false, /*nested=*/false, UNKNOWN_LOCATION);
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #13 from Jacek Caban jacek at codeweavers dot com --- Yes, it helps. Thanks.
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 Kai Tietz ktietz at gcc dot gnu.org changed: What|Removed |Added CC||whitequill at abstractions dot me --- Comment #11 from Kai Tietz ktietz at gcc dot gnu.org --- *** Bug 58061 has been marked as a duplicate of this bug. ***
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #10 from Dongsheng Song dongsheng.song at gmail dot com --- If your compiler default target support sse4.2, then you can't reproduce it: i686-w64-mingw32-gcc -march=corei7 pr57848.c But when you use target which do not support sse4.2, then the internal compiler error occurred: $ i686-w64-mingw32-gcc -c -march=core2 pr57848.c pr57848.c:2:9: internal compiler error: in c_builtin_function_ext_scope, at c/c-decl.c:3633 #pragma GCC target(sse4.2) ^ 0x57024b c_builtin_function_ext_scope(tree_node*) /home/cauchy/vcs/svn/gcc/trunk/gcc/c/c-decl.c:3633 0x79f288 add_builtin_function_common /home/cauchy/vcs/svn/gcc/trunk/gcc/langhooks.c:561 0x79fb43 add_builtin_function_ext_scope(char const*, tree_node*, int, built_in_class, char const*, tree_node*) /home/cauchy/vcs/svn/gcc/trunk/gcc/langhooks.c:597 0xa63224 ix86_add_new_builtins /home/cauchy/vcs/svn/gcc/trunk/gcc/config/i386/i386.c:27368 0xa63224 ix86_valid_target_attribute_tree(tree_node*) /home/cauchy/vcs/svn/gcc/trunk/gcc/config/i386/i386.c:4631 0x5f2000 ix86_pragma_target_parse /home/cauchy/vcs/svn/gcc/trunk/gcc/config/i386/i386-c.c:393 0x5e237d handle_pragma_target /home/cauchy/vcs/svn/gcc/trunk/gcc/c-family/c-pragma.c:805 0x59696e c_parser_pragma /home/cauchy/vcs/svn/gcc/trunk/gcc/c/c-parser.c:8972 0x5a4f5b c_parser_external_declaration /home/cauchy/vcs/svn/gcc/trunk/gcc/c/c-parser.c:1345 0x5a58c7 c_parser_translation_unit /home/cauchy/vcs/svn/gcc/trunk/gcc/c/c-parser.c:1251 0x5a58c7 c_parse_file() /home/cauchy/vcs/svn/gcc/trunk/gcc/c/c-parser.c:11223 0x5dfec4 c_common_parse_file() /home/cauchy/vcs/svn/gcc/trunk/gcc/c-family/c-opts.c:1046 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See http://gcc.gnu.org/bugs.html for instructions. i686-w64-mingw32-gcc -v Using built-in specs. COLLECT_GCC=i686-w64-mingw32-gcc COLLECT_LTO_WRAPPER=/home/cauchy/cross/i686-windows-gcc49/libexec/gcc/i686-w64-mingw32/4.9.0/lto-wrapper Target: i686-w64-mingw32 Configured with: /home/cauchy/vcs/svn/gcc/trunk/configure --prefix=/home/cauchy/cross/i686-windows-gcc49 --with-sysroot=/home/cauchy/cross/i686-windows-gcc49 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=i686-w64-mingw32 --disable-multilib --disable-nls --enable-checking=release --enable-languages=c,c++,fortran --with-arch=i686 --with-tune=generic Thread model: win32 gcc version 4.9.0 20130902 (experimental) (GCC)
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #9 from Kai Tietz ktietz at gcc dot gnu.org --- Hmm, I tried to reproduce this case with testcase: extern unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int); #pragma GCC target(sse4.2) and I don't get this ICE. I might do here something wrong, but I can't reproduce it.
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 Jacek Caban jacek at codeweavers dot com changed: What|Removed |Added CC||jacek at codeweavers dot com --- Comment #8 from Jacek Caban jacek at codeweavers dot com --- *** Bug 58287 has been marked as a duplicate of this bug. ***
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 Edward Wang edward.c.wang at compdigitec dot com changed: What|Removed |Added CC||edward.c.wang at compdigitec dot c ||om --- Comment #7 from Edward Wang edward.c.wang at compdigitec dot com --- Still reproducible for me as well with the 20130811 snapshot: URL: svn://svn.code.sf.net/p/mingw-w64/code/trunk Repository Root: svn://svn.code.sf.net/p/mingw-w64/code Repository UUID: 4407c894-4637-0410-b4f5-ada5f102cad1 Revision: 6083 Node Kind: directory Schedule: normal Last Changed Author: ktietz70 Last Changed Rev: 6082 Last Changed Date: 2013-08-13 11:05:52 -0400 (Tue, 13 Aug 2013) i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../mingw-sources/mingw-w64/mingw-w64-crt -m32 -I../../../mingw-sources/mingw-w64/mingw-w64-crt/include -D_CRTBLD -I/usr/i686-w64-mingw32/include -pipe -std=gnu99 -Wall -Wextra -Wformat -Wstrict-aliasing -Wshadow -Wpacked -Winline -Wimplicit-function-declaration -Wmissing-noreturn -Wmissing-prototypes -g -O2 -MT intrincs/lib32_libkernel32_a-__movsb.o -MD -MP -MF intrincs/.deps/lib32_libkernel32_a-__movsb.Tpo -c -o intrincs/lib32_libkernel32_a-__movsb.o `test -f 'intrincs/__movsb.c' || echo '../../../mingw-sources/mingw-w64/mingw-w64-crt/'`intrincs/__movsb.c In file included from /usr/i686-w64-mingw32/lib/gcc/i686-w64-mingw32/4.9.0/include/x86intrin.h:27:0, from /usr/i686-w64-mingw32/i686-w64-mingw32/include/intrin.h:59, from ../../../mingw-sources/mingw-w64/mingw-w64-crt/intrincs/__movsb.c:1: /usr/i686-w64-mingw32/lib/gcc/i686-w64-mingw32/4.9.0/include/ia32intrin.h:54:9: internal compiler error: in c_builtin_function_ext_scope, at c/c-decl.c:3633 #pragma GCC target(sse4.2) ^ 0x813eb4b c_builtin_function_ext_scope(tree_node*) ../../../mingw-sources/gcc-4.9-20130811/gcc/c/c-decl.c:3633 0x8487a83 add_builtin_function_common ../../../mingw-sources/gcc-4.9-20130811/gcc/langhooks.c:561 0x8847827 ix86_add_new_builtins ../../../mingw-sources/gcc-4.9-20130811/gcc/config/i386/i386.c:27508 0x8847827 ix86_valid_target_attribute_tree(tree_node*) ../../../mingw-sources/gcc-4.9-20130811/gcc/config/i386/i386.c:4832 0x8206225 ix86_pragma_target_parse ../../../mingw-sources/gcc-4.9-20130811/gcc/config/i386/i386-c.c:385 0x81ea4e8 handle_pragma_target ../../../mingw-sources/gcc-4.9-20130811/gcc/c-family/c-pragma.c:805 0x81820f1 c_parser_pragma ../../../mingw-sources/gcc-4.9-20130811/gcc/c/c-parser.c:8972 0x8193324 c_parser_external_declaration ../../../mingw-sources/gcc-4.9-20130811/gcc/c/c-parser.c:1345 0x8193d43 c_parser_translation_unit ../../../mingw-sources/gcc-4.9-20130811/gcc/c/c-parser.c:1251 0x8193d43 c_parse_file() ../../../mingw-sources/gcc-4.9-20130811/gcc/c/c-parser.c:11223 0x81e7c94 c_common_parse_file() ../../../mingw-sources/gcc-4.9-20130811/gcc/c-family/c-opts.c:1046 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See http://gcc.gnu.org/bugs.html for instructions. make[3]: *** [intrincs/lib32_libkernel32_a-__movsb.o] Error 1 make[3]: Leaving directory `/media/data/build/mingw-build/mingw-w64/mingw-w64-crt' make[2]: *** [all] Error 2 make[2]: Leaving directory `/media/data/build/mingw-build/mingw-w64/mingw-w64-crt' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/media/data/build/mingw-build/mingw-w64' make: *** [all] Error 2
[Bug target/57848] internal compiler error on builtin and '#pragma GCC target()' option
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57848 --- Comment #6 from Dongsheng Song dongsheng.song at gmail dot com --- Linux gcc 4.4.5 (Debian GNU/Linux 6.0), gcc 4.4.7 (Red Hat Enterprise Linux Server release 6.4) failed too.