[Bug c++/82952] Hang compiling with g++ -fsanitize=undefined -Wduplicated-branches
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82952 Ahmad Fatoum changed: What|Removed |Added Target||x86_64-pc-linux-gnu Host||x86_64-pc-linux-gnu Build||revision 253932 --- Comment #2 from Ahmad Fatoum --- I missed that --with-bugurl=http://bugs.opensuse.org/ the first time. I just built GCC's master branch (commit 179137d80882c7b6b58ee59eacf56fe6f8cc7596) and it's reproducible Using built-in specs. COLLECT_GCC=/opt/cross/bin/x86_64-pc-linux-gnu-g++ COLLECT_LTO_WRAPPER=/home/a3f/prjs/gcc/install/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper x86_64-pc-linux-gnu-g++ (GCC) 8.0.0 2017 (experimental) Copyright (C) 2017 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.
[Bug c++/82952] Hang compiling with g++ -fsanitize=undefined -Wduplicated-branches
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82952 --- Comment #1 from Ahmad Fatoum --- Created attachment 42587 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42587&action=edit File that hangs g++ I didn't manage to reduce it by much, because of the halting problem. At least it reliably shows the problem.
[Bug c++/82952] New: Hang compiling with g++ -fsanitize=undefined -Wduplicated-branches
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82952 Bug ID: 82952 Summary: Hang compiling with g++ -fsanitize=undefined -Wduplicated-branches Product: gcc Version: 7.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ahmad at a3f dot at Target Milestone: --- I ran into this while building Wireshark with g++ 7.2.1 revision 253932 on openSUSE Tumbleweed x86_64. Running: g++ -c hangs.cpp -std=c++11 -fsanitize=undefined -Wduplicated-branches hangs for at least 25 minutes. hangs.cpp is based off ui/qt/widgets/capture_filter_edit.cpp of commit 9d49e1316689ae05d31efc866f04ac12cd051085 in the Wireshark source tree. The stack trace shows 340+ nested calls to inchash::add_expr, abbreviated to ... here: #0 0x013d0046 in iterative_hash () #1 0x0125cd00 in inchash::add_expr(tree_node const*, inchash::hash&, unsigned int) () ... #344 0x0125cdfb in inchash::add_expr(tree_node const*, inchash::hash&, unsigned int) () #345 0x009b7dc3 in ?? () #346 0x0125cda7 in inchash::add_expr(tree_node const*, inchash::hash&, unsigned int) () #347 0x0069dfb8 in do_warn_duplicated_branches_r(tree_node**, int*, void*) () #348 0x01260437 in walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) () #349 0x01260374 in walk_tree_without_duplicates_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) () #350 0x006837d2 in ?? () #351 0x00659d83 in ?? () #352 0x00dfd701 in finish_function(int) () #353 0x005ecd97 in ?? () #354 0x0143bd59 in ?? () #355 0x00dd63da in toplev::main(int, char**) () #356 0x00dd7c7b in main () Compiler info: Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper OFFLOAD_TARGET_NAMES=hsa:nvptx-none Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --enable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux Thread model: posix gcc version 7.2.1 20171020 [gcc-7-branch revision 253932] (SUSE Linux)
[Bug fortran/82932] [8 Regression] [OOP] ICE in update_compcall_arglist, at fortran/resolve.c:5837
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82932 janus at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from janus at gcc dot gnu.org --- Fixed in r254660. Closing.
[Bug fortran/82932] [8 Regression] [OOP] ICE in update_compcall_arglist, at fortran/resolve.c:5837
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82932 --- Comment #3 from janus at gcc dot gnu.org --- Author: janus Date: Sat Nov 11 21:54:41 2017 New Revision: 254660 URL: https://gcc.gnu.org/viewcvs?rev=254660&root=gcc&view=rev Log: 2017-11-11 Janus Weil PR fortran/82932 * resolve.c (update_compcall_arglist): Improve error recovery, remove a gcc_assert. 2017-11-11 Janus Weil PR fortran/82932 * gfortran.dg/typebound_call_29.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/typebound_call_29.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog
[Bug target/62011] False Data Dependency in popcnt instruction
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62011 --- Comment #16 from Travis Downs --- Also, this is fixed for Skylake for tzcnt and lzcnt but not popcnt.
[Bug testsuite/82951] gcc.c-torture/execute/20040409-1.c undefined behavior
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82951 --- Comment #1 from Marc Glisse --- Or I should just add -fwrapv since those tests were added to test an RTL transformation ( https://gcc.gnu.org/ml/gcc-patches/2004-04/msg00615.html ).
[Bug testsuite/82951] New: gcc.c-torture/execute/20040409-1.c undefined behavior
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82951 Bug ID: 82951 Summary: gcc.c-torture/execute/20040409-1.c undefined behavior Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- While testing a VRP patch, I had failures for gcc.c-torture/execute/20040409-[1-3].c. If I run them with -fsanitize=undefined, I get 20040409-1.c:27:12: runtime error: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int' 20040409-1.c:17:12: runtime error: signed integer overflow: -2147483648 + -2147483648 cannot be represented in type 'int' 20040409-2.c:47:13: runtime error: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int' 20040409-2.c:57:23: runtime error: signed integer overflow: 4660 - -2147483648 cannot be represented in type 'int' 20040409-2.c:27:13: runtime error: signed integer overflow: -2147483648 + -2147483648 cannot be represented in type 'int' 20040409-2.c:37:23: runtime error: signed integer overflow: -2147478988 + -2147483648 cannot be represented in type 'int' 20040409-2.c:111:18: runtime error: signed integer overflow: -2147483648 + -2147478988 cannot be represented in type 'int' 20040409-3.c:27:14: runtime error: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int' 20040409-3.c:17:14: runtime error: signed integer overflow: -2147483648 + -2147483648 cannot be represented in type 'int' Unless someone volunteers to improve the tests, I'll likely remove the offending cases (and probably more since this is a grid and I don't want to look for every cell) from those 3 files.
[Bug tree-optimization/82950] possible strlen optimization for memcmp/strcmp of arrays
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82950 Martin Sebor changed: What|Removed |Added Keywords||missed-optimization See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=81703 --- Comment #1 from Martin Sebor --- Handling the constant string case and the memcpy case in tree-ssa-strlen.c probably depends on resolving bug 81703.
[Bug tree-optimization/82950] New: possible strlen optimization for memcmp/strcmp of arrays
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82950 Bug ID: 82950 Summary: possible strlen optimization for memcmp/strcmp of arrays Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- While testing some unrelated work I noticed that GCC doesn't eliminate the call to strcmp in the program below even though it could based on the knowledge that the two arrays a and b contain a copy of the same string. A nsimilar optimization is possible for memcpy (regardless of the size specified by the third argument). It seems that a good place to add this optimization might be the tree-ssa-strlen.c pass. $ cat c.c && gcc -O2 -S -Wall -fdump-tree-optimized=/dev/stdout c.c char a[4]; char b[4]; int f (void) { __builtin_strcpy (a, "abc"); __builtin_strcpy (b, "abc"); return __builtin_strcmp (a, b); // not folded but could be } int g (const char *s) { __builtin_strcpy (a, s); __builtin_strcpy (b, s); return __builtin_strcmp (a, b); // not folded but could be } ;; Function f (f, funcdef_no=0, decl_uid=1893, cgraph_uid=0, symbol_order=2) f () { int _4; [local count: 1]: MEM[(char * {ref-all})&a] = "abc"; MEM[(char * {ref-all})&b] = "abc"; _4 = __builtin_strcmp (&a, &b); [tail call] return _4; } ;; Function g (g, funcdef_no=1, decl_uid=1896, cgraph_uid=1, symbol_order=3) g (const char * s) { int _5; [local count: 1]: __builtin_strcpy (&a, s_2(D)); __builtin_strcpy (&b, s_2(D)); _5 = __builtin_strcmp (&a, &b); [tail call] return _5; }
[Bug c/81117] Improve buffer overflow checking in strncpy
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #11 from Martin Sebor --- Author: msebor Date: Sat Nov 11 18:04:21 2017 New Revision: 254659 URL: https://gcc.gnu.org/viewcvs?rev=254659&root=gcc&view=rev Log: gcc/ChangeLog: PR c/81117 * doc/extend.texi (attribute nonstring): Remove spurious argument. Modified: trunk/gcc/ChangeLog trunk/gcc/doc/extend.texi
[Bug bootstrap/82948] [8 Regression] prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82948 Martin Sebor changed: What|Removed |Added Target||powerpc64le-*-linux Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org --- Comment #2 from Martin Sebor --- r254658 should avoid the warning.
[Bug bootstrap/82948] [8 Regression] prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82948 --- Comment #1 from Martin Sebor --- Author: msebor Date: Sat Nov 11 17:43:48 2017 New Revision: 254658 URL: https://gcc.gnu.org/viewcvs?rev=254658&root=gcc&view=rev Log: PR bootstrap/82948 - prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes gcc/ChangeLog: PR bootstrap/82948 * prefic.c (translate_name): Replace strncpy with memcpy to avoid -Wstringop-truncation. Modified: trunk/gcc/ChangeLog trunk/gcc/prefix.c
[Bug target/62011] False Data Dependency in popcnt instruction
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62011 Travis Downs changed: What|Removed |Added CC||travis.downs at gmail dot com --- Comment #15 from Travis Downs --- For what it's worth and because Richard asked for it above, there is are Intel erratum for this, at least as of Haswell, for example HSD146: "POPCNT Instruction May Take Longer to Execute Than Expected". It mentions only popcnt, and I found it for Haswell, Skylake (SKL029) and Broadwell. The text is: POPCNT Instruction May Take Longer to Execute Than Expected Problem: POPCNT instruction execution with a 32 or 64 bit operand may be delayed until previous non-dependent instructions have executed. Implication: Software using the POPCNT instruction may experience lower performance than expected. Workaround: None identified
[Bug target/79964] Cortex A53 codegen still not optimal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79964 PeteVine changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #8 from PeteVine --- In case the changed behaviour of -frename-registers is not actually a feature, please reopen.
[Bug middle-end/82798] Inconsistent descriptions for warning options in documentation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82798 --- Comment #2 from Julien ÉLIE --- Other points: 6/ -Wsuggest-final-types and -Wsuggest-final-methods should be mentioned for C++ (and maybe Objective-C++) only. 7/ -Wc++11-compat and -Wc++14-compat are present in the -Wall list but without the mention for C++ and Objective-C++. I believe it should be mentioned.
[Bug testsuite/81056] [7/8 Regression] FAIL: 17_intro/names.cc (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81056 --- Comment #6 from John David Anglin --- Author: danglin Date: Sat Nov 11 16:11:50 2017 New Revision: 254655 URL: https://gcc.gnu.org/viewcvs?rev=254655&root=gcc&view=rev Log: Backport from mainline 2017-08-20 John David Anglin PR testsuite/81056 * testsuite/17_intro/names.cc: Undef 'd' and 'r' on __hpux__. Modified: branches/gcc-6-branch/libstdc++-v3/ChangeLog branches/gcc-6-branch/libstdc++-v3/testsuite/17_intro/names.cc
[Bug target/68739] FAIL: 30_threads/call_once/constexpr.cc (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68739 --- Comment #13 from John David Anglin --- Author: danglin Date: Sat Nov 11 15:53:18 2017 New Revision: 254654 URL: https://gcc.gnu.org/viewcvs?rev=254654&root=gcc&view=rev Log: Backport from mainline 2017-02-25 John David Anglin PR target/68739 * inclhack.def (hpux11_pthread_pointer): New fix. (hpux11_pthread_const): Adjust to remove void * cast from define. * fixincl.x: Regenerate. * tests/base/sys/pthread.h [HPUX11_PTHREAD_CONST_CHECK]: Update tests. Modified: branches/gcc-6-branch/fixincludes/ChangeLog branches/gcc-6-branch/fixincludes/fixincl.x branches/gcc-6-branch/fixincludes/inclhack.def branches/gcc-6-branch/fixincludes/tests/base/sys/pthread.h
[Bug c++/82949] internal compiler error: in cp_parser_late_return_type_opt, at cp/parser.c:16698
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82949 --- Comment #1 from alexander --- Created attachment 42586 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42586&action=edit preprocessed source
[Bug c++/82949] New: internal compiler error: in cp_parser_late_return_type_opt, at cp/parser.c:16698
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82949 Bug ID: 82949 Summary: internal compiler error: in cp_parser_late_return_type_opt, at cp/parser.c:16698 Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pk.al at mail dot ru Target Milestone: --- Created attachment 42585 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42585&action=edit console output g++ (Debian 4.7.2-5astra.se1) 4.7.2 Copyright (C) 2012 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.
[Bug c++/81486] Class template argument deduction fails with (), succeeds with {}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81486 --- Comment #2 from Vittorio Romeo --- Here's a snippet that seems to reproduce this bug, even without an explicit deduction guide: template struct foo { template foo(Us...) { } }; int main() { auto f = foo(); } On godbolt: https://godbolt.org/g/CgqLq5
[Bug bootstrap/82948] New: [8 Regression] prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82948 Bug ID: 82948 Summary: [8 Regression] prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation] Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- Hello, I cannot bootstrap currently (r254649) on gcc112 (powerpc64le-unknown-linux-gnu) with --with-system-zlib --disable-nls --enable-languages=all,obj-c++,go --enable-host-shared /home/glisse/pristine/gcc/prefix.c: In function 'char* translate_name(char*)': /home/glisse/pristine/gcc/prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation] strncpy (key, &name[1], keylen); ^~~ /home/glisse/pristine/gcc/prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation] /home/glisse/pristine/gcc/prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation] /home/glisse/pristine/gcc/prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation] cc1plus: all warnings being treated as errors make[3]: *** [prefix.o] Error 1 make[3]: *** Waiting for unfinished jobs rm gfortran.pod fsf-funding.pod gcov.pod gpl.pod cpp.pod gfdl.pod gccgo.pod gcc.pod gcov-dump.pod gcov-tool.pod make[3]: Leaving directory `/home/glisse/test/pristine/build/gcc' make[2]: *** [all-stage2-gcc] Error 2
[Bug fortran/82937] [F03] associate non-standard bounds are lost for associating entity
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82937 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2017-11-11 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- AFAIK the lower bounds of array slices are always 1: write(*,"(A,2('(',I2,',',I2,')'))") "arr(1,1,:,:) bounds are ",lbound(arr(1,1,:,:),1),& &ubound(arr(1,1,:,:),1),& &lbound(arr(1,1,:,:),2),ubound(arr(1,1,:,:),2) arr(1,1,:,:) bounds are ( 1, 7)( 1,10) So I am inclined to consider that myarr bounds are ( 1, 7)( 1,10) is correct and also the error with -fcheck=bounds. IMO this PR is INVALID. If you disagree, you may ask the question on comp.lang.fortran.
[Bug c++/80871] Template partial ordering considered non-ambiguous with deduced and non-deduced parameter packs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80871 Vittorio Romeo changed: What|Removed |Added CC||vittorio.romeo at outlook dot com --- Comment #1 from Vittorio Romeo --- Got hit again today, while trying to write an `overload(...)` class: template struct overload : Ts... { template constexpr overload(TFwds&&... xs) : Ts{FWD(xs)}... { } using Ts::operator()...; }; template overload(TFwds&&...) -> overload...>; With the code above auto o = overload{[]{}}; fails to compile. See: https://godbolt.org/g/Rb3ZKt