[Bug c++/81016] New: 7.1.0 ICE: segfault with template struct specialisation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81016 Bug ID: 81016 Summary: 7.1.0 ICE: segfault with template struct specialisation Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: danny+gcc at nerdcruft dot net Target Milestone: --- Created attachment 41497 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41497&action=edit reduced test case When building the attached test case with: g++-7.1.0 -std=c++17 test.ii I encounter an internal compiler error, with output: case0.ii:2:30: internal compiler error: Segmentation fault template struct b; ^ My compiler version is as follows: danny@sybil /tmp/reduce $ g++-7.1.0 -v Using built-in specs. COLLECT_GCC=g++-7.1.0 COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/7.1.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-7.1.0-r1/work/gcc-7.1.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.1.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.1.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.1.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.1.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.0/include/g++-v7 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.1.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 7.1.0-r1 p1.1' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --with-isl --disable-isl-version-check --enable-libsanitizer --disable-default-pie --disable-default-ssp Thread model: posix gcc version 7.1.0 (Gentoo 7.1.0-r1 p1.1)
[Bug c++/81016] [7/8 Regression] ICE: segfault with template struct specialisation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81016 Markus Trippelsdorf changed: What|Removed |Added Status|UNCONFIRMED |NEW Known to work||6.3.0 Keywords||ice-on-invalid-code Last reconfirmed||2017-06-08 CC||trippels at gcc dot gnu.org Ever confirmed|0 |1 Summary|7.1.0 ICE: segfault with|[7/8 Regression] ICE: |template struct |segfault with template |specialisation |struct specialisation Known to fail||7.1.0, 8.0 --- Comment #1 from Markus Trippelsdorf --- It was rightfully rejected with gcc-6. foo.ii:2:30: internal compiler error: Segmentation fault template struct b; ^ 0xd74307 crash_signal /home/markus/gcc/gcc/toplev.c:338 0x7f1551fda4cf ??? /home/markus/glibc/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x78a2af unify /home/markus/gcc/gcc/cp/pt.c:20348 0x78ce39 unify /home/markus/gcc/gcc/cp/pt.c:20629 0x78b0a9 unify /home/markus/gcc/gcc/cp/pt.c:20820 0x78ea5e get_partial_spec_bindings /home/markus/gcc/gcc/cp/pt.c:21626 0x7a57d0 process_partial_specialization /home/markus/gcc/gcc/cp/pt.c:4706 0x7a6c27 push_template_decl_real(tree_node*, bool) /home/markus/gcc/gcc/cp/pt.c:5431 0x7a9ed7 push_template_decl_real(tree_node*, bool) /home/markus/gcc/gcc/cp/pt.c:5261 0x7a9ed7 push_template_decl(tree_node*) /home/markus/gcc/gcc/cp/pt.c:5672 0x7a9ed7 maybe_process_partial_specialization(tree_node*) /home/markus/gcc/gcc/cp/pt.c:973 0x67e914 shadow_tag(cp_decl_specifier_seq*) /home/markus/gcc/gcc/cp/decl.c:4827 0x71f9fa cp_parser_single_declaration /home/markus/gcc/gcc/cp/parser.c:26689 0x742a72 cp_parser_template_declaration_after_parameters /home/markus/gcc/gcc/cp/parser.c:26352 0x7426f5 cp_parser_explicit_template_declaration /home/markus/gcc/gcc/cp/parser.c:26587 0x7426f5 cp_parser_template_declaration_after_export /home/markus/gcc/gcc/cp/parser.c:26606 0x74abc9 cp_parser_declaration /home/markus/gcc/gcc/cp/parser.c:12472 0x74c734 cp_parser_declaration_seq_opt /home/markus/gcc/gcc/cp/parser.c:12399 0x74ca51 cp_parser_translation_unit /home/markus/gcc/gcc/cp/parser.c:4364 0x74ca51 c_parse_file() /home/markus/gcc/gcc/cp/parser.c:38475
[Bug sanitizer/80932] UBSAN: false positive as a result of distribution: c1*(c2*v1-c3*v2)=>c1*c2*v1-c1*c3*v2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80932 Markus Trippelsdorf changed: What|Removed |Added CC||trippels at gcc dot gnu.org --- Comment #6 from Markus Trippelsdorf --- New failures: FAIL: c-c++-common/ubsan/pr80932.c -O0 execution test FAIL: c-c++-common/ubsan/pr80932.c -O0 execution test
[Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80928 --- Comment #14 from Richard Biener --- Author: rguenth Date: Thu Jun 8 07:32:52 2017 New Revision: 249004 URL: https://gcc.gnu.org/viewcvs?rev=249004&root=gcc&view=rev Log: 2017-06-08 Richard Biener PR tree-optimization/80928 * gcc.dg/vect/slp-perm-8.c: Do not expect check loop to be vectorized. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
[Bug middle-end/77925] Add __builtin_issubnormal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77925 --- Comment #1 from tnfchris at gcc dot gnu.org --- Author: tnfchris Date: Thu Jun 8 07:38:42 2017 New Revision: 249005 URL: https://gcc.gnu.org/viewcvs?rev=249005&root=gcc&view=rev Log: 2017-06-08 Tamar Christina PR middle-end/77925 PR middle-end/77926 PR middle-end/66462 * gcc/builtins.c (fold_builtin_fpclassify): Remove. (fold_builtin_interclass_mathfn): Remove. (expand_builtin): Add builtins to lowering list. (fold_builtin_n): Remove fold_builtin_varargs. (fold_builtin_varargs): Remove. * gcc/builtins.def (BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL): New. * gcc/real.h (get_min_float): New. (real_format): Add is_ieee_compatible field. * gcc/real.c (get_min_float): New. (ieee_single_format): Set is_ieee_compatible flag. * gcc/gimple-low.c (lower_stm): Define BUILT_IN_FPCLASSIFY, CASE_FLT_FN (BUILT_IN_ISINF), BUILT_IN_ISINFD32, BUILT_IN_ISINFD64, BUILT_IN_ISINFD128, BUILT_IN_ISNAND32, BUILT_IN_ISNAND64, BUILT_IN_ISNAND128, BUILT_IN_ISNAN, BUILT_IN_ISNORMAL, BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL, CASE_FLT_FN (BUILT_IN_FINITE), BUILT_IN_FINITED32 BUILT_IN_FINITED64, BUILT_IN_FINITED128, BUILT_IN_ISFINITE. (lower_builtin_fpclassify, is_nan, is_normal, is_infinity): New. (is_zero, is_subnormal, is_finite, use_ieee_int_mode): Likewise. (lower_builtin_isnan, lower_builtin_isinfinite): Likewise. (lower_builtin_isnormal, lower_builtin_iszero): Likewise. (lower_builtin_issubnormal, lower_builtin_isfinite): Likewise. (emit_tree_cond, get_num_as_int, emit_tree_and_return_var): New. (mips_single_format): Likewise. (motorola_single_format): Likewise. (spu_single_format): Likewise. (ieee_double_format): Likewise. (mips_double_format): Likewise. (motorola_double_format): Likewise. (ieee_extended_motorola_format): Likewise. (ieee_extended_intel_128_format): Likewise. (ieee_extended_intel_96_round_53_format): Likewise. (ibm_extended_format): Likewise. (mips_extended_format): Likewise. (ieee_quad_format): Likewise. (mips_quad_format): Likewise. (vax_f_format): Likewise. (vax_d_format): Likewise. (vax_g_format): Likewise. (decimal_single_format): Likewise. (decimal_quad_format): Likewise. (iee_half_format): Likewise. (mips_single_format): Likewise. (arm_half_format): Likewise. (real_internal_format): Likewise. * gcc/doc/extend.texi: Add documentation for built-ins. * gcc/c/c-typeck.c (convert_arguments): Add BUILT_IN_ISZERO and BUILT_IN_ISSUBNORMAL. gcc/testsuite/ 2017-06-08 Tamar Christina * gcc.target/aarch64/builtin-fpclassify.c: New codegen test. * gcc.dg/fold-notunord.c: Removed. * gcc.dg/torture/floatn-tg-4.h: Add tests for iszero and issubnormal. * gcc.dg/torture/float128-tg-4.c: Likewise. * gcc.dg/torture/float128x-tg-4: Likewise. * gcc.dg/torture/float16-tg-4.c: Likewise. * gcc.dg/torture/float32-tg-4.c: Likewise. * gcc.dg/torture/float32x-tg-4.c: Likewise. * gcc.dg/torture/float64-tg-4.c: Likewise. * gcc.dg/torture/float64x-tg-4.c: Likewise. * gcc.dg/pr28796-1.c: Add -O2. * gcc.dg/builtins-43.c: Check lower instead of gimple. * gcc.dg/tg-tests.h: Add iszero and issubnormal. * gcc.dg/pr77925.c: Add to test safe cases. Added: trunk/gcc/testsuite/gcc.dg/pr77925.c trunk/gcc/testsuite/gcc.dg/torture/float128-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float128x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float16-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float32-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float32x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float64-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float64x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/floatn-tg-4.h trunk/gcc/testsuite/gcc.target/aarch64/builtin-fpclassify.c Removed: trunk/gcc/testsuite/gcc.dg/fold-notunord.c Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c trunk/gcc/builtins.def trunk/gcc/c/c-typeck.c trunk/gcc/doc/extend.texi trunk/gcc/gimple-low.c trunk/gcc/real.c trunk/gcc/real.h trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/builtins-43.c trunk/gcc/testsuite/gcc.dg/pr28796-1.c trunk/gcc/testsuite/gcc.dg/tg-tests.h
[Bug middle-end/77926] Add __builtin_iszero
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77926 --- Comment #1 from tnfchris at gcc dot gnu.org --- Author: tnfchris Date: Thu Jun 8 07:38:42 2017 New Revision: 249005 URL: https://gcc.gnu.org/viewcvs?rev=249005&root=gcc&view=rev Log: 2017-06-08 Tamar Christina PR middle-end/77925 PR middle-end/77926 PR middle-end/66462 * gcc/builtins.c (fold_builtin_fpclassify): Remove. (fold_builtin_interclass_mathfn): Remove. (expand_builtin): Add builtins to lowering list. (fold_builtin_n): Remove fold_builtin_varargs. (fold_builtin_varargs): Remove. * gcc/builtins.def (BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL): New. * gcc/real.h (get_min_float): New. (real_format): Add is_ieee_compatible field. * gcc/real.c (get_min_float): New. (ieee_single_format): Set is_ieee_compatible flag. * gcc/gimple-low.c (lower_stm): Define BUILT_IN_FPCLASSIFY, CASE_FLT_FN (BUILT_IN_ISINF), BUILT_IN_ISINFD32, BUILT_IN_ISINFD64, BUILT_IN_ISINFD128, BUILT_IN_ISNAND32, BUILT_IN_ISNAND64, BUILT_IN_ISNAND128, BUILT_IN_ISNAN, BUILT_IN_ISNORMAL, BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL, CASE_FLT_FN (BUILT_IN_FINITE), BUILT_IN_FINITED32 BUILT_IN_FINITED64, BUILT_IN_FINITED128, BUILT_IN_ISFINITE. (lower_builtin_fpclassify, is_nan, is_normal, is_infinity): New. (is_zero, is_subnormal, is_finite, use_ieee_int_mode): Likewise. (lower_builtin_isnan, lower_builtin_isinfinite): Likewise. (lower_builtin_isnormal, lower_builtin_iszero): Likewise. (lower_builtin_issubnormal, lower_builtin_isfinite): Likewise. (emit_tree_cond, get_num_as_int, emit_tree_and_return_var): New. (mips_single_format): Likewise. (motorola_single_format): Likewise. (spu_single_format): Likewise. (ieee_double_format): Likewise. (mips_double_format): Likewise. (motorola_double_format): Likewise. (ieee_extended_motorola_format): Likewise. (ieee_extended_intel_128_format): Likewise. (ieee_extended_intel_96_round_53_format): Likewise. (ibm_extended_format): Likewise. (mips_extended_format): Likewise. (ieee_quad_format): Likewise. (mips_quad_format): Likewise. (vax_f_format): Likewise. (vax_d_format): Likewise. (vax_g_format): Likewise. (decimal_single_format): Likewise. (decimal_quad_format): Likewise. (iee_half_format): Likewise. (mips_single_format): Likewise. (arm_half_format): Likewise. (real_internal_format): Likewise. * gcc/doc/extend.texi: Add documentation for built-ins. * gcc/c/c-typeck.c (convert_arguments): Add BUILT_IN_ISZERO and BUILT_IN_ISSUBNORMAL. gcc/testsuite/ 2017-06-08 Tamar Christina * gcc.target/aarch64/builtin-fpclassify.c: New codegen test. * gcc.dg/fold-notunord.c: Removed. * gcc.dg/torture/floatn-tg-4.h: Add tests for iszero and issubnormal. * gcc.dg/torture/float128-tg-4.c: Likewise. * gcc.dg/torture/float128x-tg-4: Likewise. * gcc.dg/torture/float16-tg-4.c: Likewise. * gcc.dg/torture/float32-tg-4.c: Likewise. * gcc.dg/torture/float32x-tg-4.c: Likewise. * gcc.dg/torture/float64-tg-4.c: Likewise. * gcc.dg/torture/float64x-tg-4.c: Likewise. * gcc.dg/pr28796-1.c: Add -O2. * gcc.dg/builtins-43.c: Check lower instead of gimple. * gcc.dg/tg-tests.h: Add iszero and issubnormal. * gcc.dg/pr77925.c: Add to test safe cases. Added: trunk/gcc/testsuite/gcc.dg/pr77925.c trunk/gcc/testsuite/gcc.dg/torture/float128-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float128x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float16-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float32-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float32x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float64-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float64x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/floatn-tg-4.h trunk/gcc/testsuite/gcc.target/aarch64/builtin-fpclassify.c Removed: trunk/gcc/testsuite/gcc.dg/fold-notunord.c Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c trunk/gcc/builtins.def trunk/gcc/c/c-typeck.c trunk/gcc/doc/extend.texi trunk/gcc/gimple-low.c trunk/gcc/real.c trunk/gcc/real.h trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/builtins-43.c trunk/gcc/testsuite/gcc.dg/pr28796-1.c trunk/gcc/testsuite/gcc.dg/tg-tests.h
[Bug middle-end/66462] GCC isinf/isnan/... builtins cause sNaN exceptions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66462 --- Comment #4 from tnfchris at gcc dot gnu.org --- Author: tnfchris Date: Thu Jun 8 07:38:42 2017 New Revision: 249005 URL: https://gcc.gnu.org/viewcvs?rev=249005&root=gcc&view=rev Log: 2017-06-08 Tamar Christina PR middle-end/77925 PR middle-end/77926 PR middle-end/66462 * gcc/builtins.c (fold_builtin_fpclassify): Remove. (fold_builtin_interclass_mathfn): Remove. (expand_builtin): Add builtins to lowering list. (fold_builtin_n): Remove fold_builtin_varargs. (fold_builtin_varargs): Remove. * gcc/builtins.def (BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL): New. * gcc/real.h (get_min_float): New. (real_format): Add is_ieee_compatible field. * gcc/real.c (get_min_float): New. (ieee_single_format): Set is_ieee_compatible flag. * gcc/gimple-low.c (lower_stm): Define BUILT_IN_FPCLASSIFY, CASE_FLT_FN (BUILT_IN_ISINF), BUILT_IN_ISINFD32, BUILT_IN_ISINFD64, BUILT_IN_ISINFD128, BUILT_IN_ISNAND32, BUILT_IN_ISNAND64, BUILT_IN_ISNAND128, BUILT_IN_ISNAN, BUILT_IN_ISNORMAL, BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL, CASE_FLT_FN (BUILT_IN_FINITE), BUILT_IN_FINITED32 BUILT_IN_FINITED64, BUILT_IN_FINITED128, BUILT_IN_ISFINITE. (lower_builtin_fpclassify, is_nan, is_normal, is_infinity): New. (is_zero, is_subnormal, is_finite, use_ieee_int_mode): Likewise. (lower_builtin_isnan, lower_builtin_isinfinite): Likewise. (lower_builtin_isnormal, lower_builtin_iszero): Likewise. (lower_builtin_issubnormal, lower_builtin_isfinite): Likewise. (emit_tree_cond, get_num_as_int, emit_tree_and_return_var): New. (mips_single_format): Likewise. (motorola_single_format): Likewise. (spu_single_format): Likewise. (ieee_double_format): Likewise. (mips_double_format): Likewise. (motorola_double_format): Likewise. (ieee_extended_motorola_format): Likewise. (ieee_extended_intel_128_format): Likewise. (ieee_extended_intel_96_round_53_format): Likewise. (ibm_extended_format): Likewise. (mips_extended_format): Likewise. (ieee_quad_format): Likewise. (mips_quad_format): Likewise. (vax_f_format): Likewise. (vax_d_format): Likewise. (vax_g_format): Likewise. (decimal_single_format): Likewise. (decimal_quad_format): Likewise. (iee_half_format): Likewise. (mips_single_format): Likewise. (arm_half_format): Likewise. (real_internal_format): Likewise. * gcc/doc/extend.texi: Add documentation for built-ins. * gcc/c/c-typeck.c (convert_arguments): Add BUILT_IN_ISZERO and BUILT_IN_ISSUBNORMAL. gcc/testsuite/ 2017-06-08 Tamar Christina * gcc.target/aarch64/builtin-fpclassify.c: New codegen test. * gcc.dg/fold-notunord.c: Removed. * gcc.dg/torture/floatn-tg-4.h: Add tests for iszero and issubnormal. * gcc.dg/torture/float128-tg-4.c: Likewise. * gcc.dg/torture/float128x-tg-4: Likewise. * gcc.dg/torture/float16-tg-4.c: Likewise. * gcc.dg/torture/float32-tg-4.c: Likewise. * gcc.dg/torture/float32x-tg-4.c: Likewise. * gcc.dg/torture/float64-tg-4.c: Likewise. * gcc.dg/torture/float64x-tg-4.c: Likewise. * gcc.dg/pr28796-1.c: Add -O2. * gcc.dg/builtins-43.c: Check lower instead of gimple. * gcc.dg/tg-tests.h: Add iszero and issubnormal. * gcc.dg/pr77925.c: Add to test safe cases. Added: trunk/gcc/testsuite/gcc.dg/pr77925.c trunk/gcc/testsuite/gcc.dg/torture/float128-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float128x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float16-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float32-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float32x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float64-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/float64x-tg-4.c trunk/gcc/testsuite/gcc.dg/torture/floatn-tg-4.h trunk/gcc/testsuite/gcc.target/aarch64/builtin-fpclassify.c Removed: trunk/gcc/testsuite/gcc.dg/fold-notunord.c Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c trunk/gcc/builtins.def trunk/gcc/c/c-typeck.c trunk/gcc/doc/extend.texi trunk/gcc/gimple-low.c trunk/gcc/real.c trunk/gcc/real.h trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/builtins-43.c trunk/gcc/testsuite/gcc.dg/pr28796-1.c trunk/gcc/testsuite/gcc.dg/tg-tests.h
[Bug lto/81004] [7/8 Regression] linking failed with -flto and static libboost_program_options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 --- Comment #8 from Martin Liška --- Started with r238959.
[Bug gcov-profile/80911] gcov failed: gcno corrupted
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80911 --- Comment #18 from Martin Liška --- Author: marxin Date: Thu Jun 8 07:51:07 2017 New Revision: 249006 URL: https://gcc.gnu.org/viewcvs?rev=249006&root=gcc&view=rev Log: gcov: Add block_info::block_info (PR gcov-profile/80911). 2017-06-08 Martin Liska PR gcov-profile/80911 * gcov.c (block_info::block_info): New constructor. Modified: trunk/gcc/ChangeLog trunk/gcc/gcov.c
[Bug gcov-profile/80911] gcov failed: gcno corrupted
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80911 Martin Liška changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #19 from Martin Liška --- Fixed.
[Bug target/81015] Bad codegen for __builtin_clz(unsigned short)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81015 Uroš Bizjak changed: What|Removed |Added Target||x86 Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-06-08 Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail dot com Target Milestone|--- |7.2 Ever confirmed|0 |1 --- Comment #1 from Uroš Bizjak --- Introduced by the following commit: 2016-12-14 Uros Bizjak PR target/59874 * config/i386/i386-builtin.def: Add __builtin_clzs and __builtin_ctzs. (ix86_fold_builtin): Handle IX86_BUILTIN_CTZS and IX86_BUILTIN_CLZS. * config/i386/i386.md (*ctzhi2): New insn_and_split pattern. (*clzhi2): Ditto. ctzhi2 and clzhi2 patterns are wrong and this part should be reverted.
[Bug middle-end/77925] Add __builtin_issubnormal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77925 tnfchris at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||tnfchris at gcc dot gnu.org Resolution|--- |FIXED --- Comment #2 from tnfchris at gcc dot gnu.org --- Fixed in r249005
[Bug target/81015] Bad codegen for __builtin_clz(unsigned short)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81015 --- Comment #2 from Uroš Bizjak --- Created attachment 41498 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41498&action=edit Patch to remove invalid patterns Patch in testing.
[Bug middle-end/77926] Add __builtin_iszero
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77926 tnfchris at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||tnfchris at gcc dot gnu.org Resolution|--- |FIXED --- Comment #2 from tnfchris at gcc dot gnu.org --- Fixed in r249005
[Bug ipa/81000] std::any improvement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81000 --- Comment #3 from Richard Biener --- I never understand why people think that using a library to implement things that look like language features is a good idea ... it just will make your programs compile slower and possibly be optimized less. Stupid C++.
[Bug middle-end/66462] GCC isinf/isnan/... builtins cause sNaN exceptions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66462 tnfchris at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||tnfchris at gcc dot gnu.org Resolution|--- |FIXED --- Comment #5 from tnfchris at gcc dot gnu.org --- Fixed in r249005
[Bug c++/81017] New: Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 Bug ID: 81017 Summary: Class with vector of unique_ptr and std::function does not compile Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Sagar2.shah at citi dot com Target Milestone: --- I have below code which does not compile with gcc 7.1.0 compiler. Though it compiles well with clang 4.0.0 #include #include #include #include #include class Foo { public: Foo() {} using messageFunc = std::function; std::vector> vec; messageFunc f; private: void print_add(int i) const { std::cout << i << '\n'; } }; int main() { Foo o; std::vector vec; vec.reserve(10); } compilation error - In file included from /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/memory:64:0, from prog.cc:3: /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_construct.h: In instantiation of 'void std::_Construct(_T1*, _Args&& ...) [with _T1 = std::unique_ptr; _Args = {const std::unique_ptr >&}]': /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_uninitialized.h:83:18: required from 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _ForwardIterator = std::unique_ptr*; bool _TrivialValueTypes = false]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_uninitialized.h:134:15: required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _ForwardIterator = std::unique_ptr*]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_uninitialized.h:289:37: required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _ForwardIterator = std::unique_ptr*; _Tp = std::unique_ptr]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_vector.h:331:31: required from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::unique_ptr; _Alloc = std::allocator >]' prog.cc:7:7: required from 'void std::_Construct(_T1*, _Args&& ...) [with _T1 = Foo; _Args = {const Foo&}]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_uninitialized.h:83:18: required from 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const Foo*; _ForwardIterator = Foo*; bool _TrivialValueTypes = false]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_uninitialized.h:134:15: required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const Foo*; _ForwardIterator = Foo*]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_uninitialized.h:289:37: required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = const Foo*; _ForwardIterator = Foo*; _Tp = Foo]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_vector.h:1263:35: required from 'std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(std::vector<_Tp, _Alloc>::size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = const Foo*; _Tp = Foo; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::pointer = Foo*; std::vector<_Tp, _Alloc>::size_type = long unsigned int]' /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/vector.tcc:73:40: required from 'void std::vector<_Tp, _Alloc>::reserve(std::vector<_Tp, _Alloc>::size_type) [with _Tp = Foo; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int]' prog.cc:22:19: required from here /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/stl_construct.h:75:7: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = int; _Dp = std::default_delete]' { ::new(static_cast(__p)) _T1(std::forward<_Args>(__args)...); } ^~ In file included from /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/memory:80:0, from prog.cc:3: /opt/wandbox/gcc-7.1.0/include/c++/7.1.0/bits/unique_ptr.h:388:7: note: declared here unique_ptr(const unique_ptr&) = delete; ^~
[Bug debug/81001] incorrect debug info for parameter that is const pointer to typedef of array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81001 Richard Biener changed: What|Removed |Added Keywords||wrong-debug Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 Ever confirmed|0 |1 Known to fail||4.3.4, 4.8.5, 7.1.0 --- Comment #1 from Richard Biener --- Confirmed. Smaller testcase: typedef int Bar[12]; void foo2(const Bar* f){} looks like it never worked. Fails for both C and C++ FEs.
[Bug libstdc++/81004] [7/8 Regression] linking failed with -flto and static libboost_program_options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 Richard Biener changed: What|Removed |Added Priority|P3 |P2 Target Milestone|--- |7.2
[Bug middle-end/81005] -fsanitize=null and -fsanitize=alignment doesn't check aggregate arguments of calls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81005 --- Comment #2 from Richard Biener --- Likewise for asm operands or aggregate call LHS.
[Bug c++/81007] [7/8 Regression] ICE with virtual function in broken class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81007 Richard Biener changed: What|Removed |Added Priority|P3 |P4 Target Milestone|--- |7.2
[Bug middle-end/81005] -fsanitize=null and -fsanitize=alignment doesn't check aggregate arguments of calls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81005 --- Comment #3 from Jakub Jelinek --- Aggregate call lhs is handled already, gimple_store_p should be true for it. Asm is indeed not handled, will look at that.
[Bug tree-optimization/81008] missing optimization for restricted pointers passed to functions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81008 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 CC||rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Richard Biener --- That we do not optimize this is mostly an implementation issue as we do not have a way to annotate a call with dependence info. We'd have to grow gcall to add this for example or somehow integrate / refactor this with the call_used/clobbered sets already there (there's enough padding in those structs, we could decompose them, combining them and providing accessors).
[Bug c++/81014] internal compiler error: in make_decl_rtl, at varasm.c:1311
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81014 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2017-06-08 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Unfortunately, w/o a code snippet it's hard to guess what's wrong. Can you please try to reduce source code: https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
[Bug c++/81013] [7/8 Regression] ICE with invalid union in class hierarchy
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81013 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 CC||marxin at gcc dot gnu.org, ||paolo.carlini at oracle dot com Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Confirmed, started with r237482.
[Bug middle-end/81005] -fsanitize=null and -fsanitize=alignment doesn't check aggregate arguments of calls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81005 --- Comment #4 from Jakub Jelinek --- Actually, not 100% sure about asm, we don't instrument those with asan either, the problem is that there is no guarantee the asm reads or writes any of the aggregate operands, so instrumenting those is problematic.
[Bug tree-optimization/81009] missing aliasing optimization for const restrict pointers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81009 Richard Biener changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener --- const qualification doesn't mean anything to the middle-end and it would be dangerous to interpret it that way given we support more than just C as input language. So the C FE would have to communicate this in a more explict way. Anyway, doesn't this even apply to void f (int *); void g (const int* restrict p) { int x = *p; f ((int *)p); // f() cannot modify *p here if (x != *p) // cannot be true __builtin_abort (); } ?
[Bug c++/81011] [6/7/8 Regression] ICE with #pragma omp task and inaccessible copy-constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81011 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 CC||jakub at gcc dot gnu.org, ||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Started with r234779.
[Bug c/81006] ICE with zero-size array and #pragma omp task depend
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81006 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 CC||jakub at gcc dot gnu.org, ||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Started with GCC 4.9.0, before that error message was displayed: pr81006.cpp: In function ‘void foo()’: pr81006.cpp:5:20: error: expected ‘#pragma omp’ clause before ‘depend’ #pragma omp task depend(out: a[:]) ^
[Bug tree-optimization/81010] [8 regression] test case gcc.target/powerpc/pr56605.c fails starting with r248958
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81010 amker at gcc dot gnu.org changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |amker at gcc dot gnu.org --- Comment #2 from amker at gcc dot gnu.org --- I will have look later. Thanks
[Bug c++/81007] [7/8 Regression] ICE with virtual function in broken class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81007 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 CC||marxin at gcc dot gnu.org, ||rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Started with r235817.
[Bug libstdc++/81004] [7/8 Regression] linking failed with -flto and static libboost_program_options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 Markus Trippelsdorf changed: What|Removed |Added Attachment #41495|0 |1 is obsolete|| --- Comment #9 from Markus Trippelsdorf --- Created attachment 41499 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41499&action=edit reduced testcase
[Bug tree-optimization/81010] [8 regression] test case gcc.target/powerpc/pr56605.c fails starting with r248958
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81010 Richard Biener changed: What|Removed |Added Assignee|amker at gcc dot gnu.org |unassigned at gcc dot gnu.org Target Milestone|--- |8.0
[Bug c++/81013] [7/8 Regression] ICE with invalid union in class hierarchy
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81013 Richard Biener changed: What|Removed |Added Priority|P3 |P4 Version|unknown |7.1.0 Target Milestone|--- |7.2
[Bug c++/81011] [6/7/8 Regression] ICE with #pragma omp task and inaccessible copy-constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81011 Richard Biener changed: What|Removed |Added Priority|P3 |P4 Version|unknown |6.1.0 Target Milestone|--- |6.4
[Bug c++/81016] [7/8 Regression] ICE: segfault with template struct specialisation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81016 Richard Biener changed: What|Removed |Added Priority|P3 |P2 Target Milestone|--- |7.2
[Bug lto/81004] [7/8 Regression] linking failed with -flto and static libboost_program_options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 Jonathan Wakely changed: What|Removed |Added Component|libstdc++ |lto --- Comment #10 from Jonathan Wakely --- (In reply to Martin Liška from comment #8) > Started with r238959. The point of this change is that the explicit instantiations do not include the new C++17-only functions, because they're compiled with -std=gnu++11. I didn't want to instantiate and export new experimental C++17 symbols until we know they're stable. But it shouldn't matter, the files compiled as C++17 should implicitly instantiate everything they need, so if those symbols go missing that's a bug in the compiler or LTO plugin, not libstdc++.
[Bug c++/81007] [7/8 Regression] ICE with virtual function in broken class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81007 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #2 from Richard Biener --- (gdb) p debug_tree (field) nonlocal VOID file t.ii line 3 col 5 align 1 offset_align 1 context chain > (gdb) up #5 0x00edadbd in ipa_polymorphic_call_context::restrict_to_inner_class (this=0x7fffcca0, otr_type=, consider_placement_new=false, consider_bases=false) at /space/rguenther/src/svn/early-lto-debug/gcc/ipa-polymorphic-call.c:273 273 pos = int_bit_position (fld); (gdb) l 268 for (fld = TYPE_FIELDS (type); fld; fld = DECL_CHAIN (fld)) 269 { 270 if (TREE_CODE (fld) != FIELD_DECL) 271 continue; 272 273 pos = int_bit_position (fld); I don't think we should try to deal with error stuff in optimization so... Index: gcc/gimplify.c === --- gcc/gimplify.c (revision 249003) +++ gcc/gimplify.c (working copy) @@ -3067,6 +3067,10 @@ gimplify_arg (tree *arg_p, gimple_seq *p static bool maybe_fold_stmt (gimple_stmt_iterator *gsi) { + /* Do not fold if we may have invalid IL somewhere. */ + if (seen_error ()) +return false; + struct gimplify_omp_ctx *ctx; for (ctx = gimplify_omp_ctxp; ctx; ctx = ctx->outer_context) if ((ctx->region_type & (ORT_TARGET | ORT_PARALLEL | ORT_TASK)) != 0) which delays the ICE until cgraphbuild... (pass_build_cgraph_edges). So ... Index: gcc/cgraphbuild.c === --- gcc/cgraphbuild.c (revision 249003) +++ gcc/cgraphbuild.c (working copy) @@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. #include "gimple-walk.h" #include "ipa-utils.h" #include "except.h" +#include "diagnostic-core.h" /* Context of record_reference. */ struct record_reference_ctx @@ -305,6 +306,7 @@ public: /* opt_pass methods: */ virtual unsigned int execute (function *); + virtual bool gate (function *) { return ! seen_error (); } }; // class pass_build_cgraph_edges unsigned int
[Bug testsuite/80759] gcc.target/x86_64/abi/ms-sysv FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80759 --- Comment #28 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #27 from ro at CeBiTec dot Uni-Bielefeld.DE Uni-Bielefeld.DE> --- [...] > Besides, can you *pretty please* concentrate on the issue at hand in > this PR, i.e. the failing tests on i?86 -m64? Most/all of your > cleanups, nice as they may be on their own, have nothing to do with the > PR and just distract from the main issue. I've also included your patches in yesterday night's full bootstraps and found an additional issue: with -j96 (sparc-sun-solaris2.12) resp. -j24 (i386-pc-solaris2.12), I get many (74 resp. 100) instances of WARNING: dg_set_test_count should be called prior to running any test. in mail-report.log. As I've said before, the parallelization of ms-sysv.exp runs may be a bonus, but is certainly separate from this PR and thus should be split out: a sequential run of ms-sysv.exp (-m64/-m32) on x86_64-pc-linux-gnu takes just 3m36 on a 2.67 GHz Xeon X7542 with default checking options; nothing to worry about for the common case. Rainer
[Bug lto/81004] [7/8 Regression] linking failed with -flto and static libboost_program_options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 --- Comment #11 from Markus Trippelsdorf --- It goes from: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev/37 (__comp_dtor ) @0x7f9a6e65eb80 Type: function definition analyzed alias Visibility: externally_visible prevailing_def public weak comdat comdat_group:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED5Ev one_only visibility_specified Same comdat group as: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev/36 Address is taken. References: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev/36 (alias) Referring: _ZN5boost15program_options17get_single_stringIcEEvSt1AINSt7__cxx1112basic_stringIT_St11char_traitsIS5_ESaIS5_.isra.0/59 (addr) Read from file: /tmp/cc8JHtNO.o Availability: available First run: 0 Function flags: Called by: Calls: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev/36 (__base_dtor ) @0x7f9a6e65ea10 Type: function definition analyzed Visibility: externally_visible public weak comdat comdat_group:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED5Ev one_only visibility_specified Same comdat group as: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev/37 Address is taken. References: Referring: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev/37 (alias) Read from file: /tmp/cc8JHtNO.o Availability: available First run: 0 Function flags: Called by: Calls: to: Optimized Symbol table: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev/37 (__comp_dtor ) @0x7f9a6e65eb80 Type: function definition analyzed alias Visibility: externally_visible prevailing_def Address is taken. References: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev/36 (alias) Referring: _ZN5boost15program_options17get_single_stringIcEEvSt1AINSt7__cxx1112basic_stringIT_St11char_traitsIS5_ESaIS5_.isra.0/59 (addr) Read from file: /tmp/cc8JHtNO.o Availability: available First run: 0 Function flags: Called by: Calls: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev/36 (__base_dtor ) @0x7f9a6e65ea10 Type: function definition analyzed Visibility: prevailing_def_ironly Address is taken. References:
[Bug libstdc++/81017] Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-06-08 Component|c++ |libstdc++ Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely --- We're missing noexcept on function(function&&)
[Bug libstdc++/81017] Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 --- Comment #2 from Jonathan Wakely --- #include #include #include struct Foo { std::vector> vec; std::function f; }; int main() { std::vector vec; vec.reserve(10); }
[Bug sanitizer/80963] UBSAN false positive with visibility=hidden
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80963 --- Comment #3 from Jan Engelhardt --- The question is more like - can it be made to work even if (In reply to Andrew Pinski from comment #1) > > That is Archive in the shared library and in the main executable are > considered two different classes. If that is how UBSAN thinks, then it should say so by uniquely identifying each "distinct" class, e.g.: main.cpp:3:16: runtime error: member call on address 0x00dcfc20 which does not point to an object of type 'Archive.1234' 0x00dcfc20: note: object is of type 'ArchiveImpl' [Archive.5678] Secondly, I think that considering them two different classes is only valid in C, but not under the ODR rules of C++. Finally, nonwithstanding all the above, it would be nice to have some -f option to always make UBSAN treat same-name classes as the same thing irrespective of visibility. Reason: to make UBSAN "work" with this example meant having to edit configure.ac+Makefile.am (of the particular real-world program) to not use "-Wl,--version-script=foo.sym -fvisiblity=hidden" at all, and that was a little more work than just slapping another -f into CXXFLAGS.
[Bug debug/81001] incorrect debug info for parameter that is const pointer to typedef of array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81001 --- Comment #2 from Andrew Pinski --- This might be related to const don't applies to the array itself but to the type which the array is of in both c and c++ .
[Bug sanitizer/80963] UBSAN false positive with visibility=hidden
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80963 --- Comment #4 from Jakub Jelinek --- (In reply to Jan Engelhardt from comment #3) > The question is more like - can it be made to work even if (In reply to > Andrew Pinski from comment #1) > > > > That is Archive in the shared library and in the main executable are > > considered two different classes. > > If that is how UBSAN thinks, then it should say so by uniquely identifying > each "distinct" class, e.g.: > > main.cpp:3:16: runtime error: member call on address 0x00dcfc20 which > does not point to an object of type 'Archive.1234' > 0x00dcfc20: note: object is of type 'ArchiveImpl' [Archive.5678] Where would those magic numbers come from? We don't have anything like that. > Secondly, I think that considering them two different classes is only valid > in C, but not under the ODR rules of C++. By using visibility other than default, you intentionally depart from the C++ ODR rules, it is an extension and the classes are not the same anymore in different shared libraries. > Finally, nonwithstanding all the above, it would be nice to have some -f > option to always make UBSAN treat same-name classes as the same thing > irrespective of visibility. Reason: to make UBSAN "work" with this example > meant having to edit configure.ac+Makefile.am (of the particular real-world > program) to not use "-Wl,--version-script=foo.sym -fvisiblity=hidden" at > all, and that was a little more work than just slapping another -f into > CXXFLAGS. The point of UBSAN is to diagnose UB, and your testcase has UB. If you want some -f option, that option is -fvisibility=default, which will make the code well defined and ubsan will not complain about it.
[Bug tree-optimization/81018] New: [8 regression] gfortran.dg/graphite/pr14741.f90 FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81018 Bug ID: 81018 Summary: [8 regression] gfortran.dg/graphite/pr14741.f90 FAILs Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- Target: i386-pc-solaris2.12, sparc-sun-solaris2.12, x86_64-pc-linux-gnu, x86_64-unknown-freebsd12.0 Between 20170606 (r248925) and 20170607 (r248990), a testsuite regression appeared: +FAIL: gfortran.dg/graphite/pr14741.f90 -O scan-tree-dump graphite "tiled by" I'm seeing it on Solaris/x86 and Solaris/SPARC, 64-bit only, and according to gcc-testresults it happens on Linux/x86_64 and FreeBSD/x86_64, too. Rainer
[Bug tree-optimization/81018] [8 regression] gfortran.dg/graphite/pr14741.f90 FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81018 Rainer Orth changed: What|Removed |Added Target Milestone|--- |8.0
[Bug sanitizer/80963] UBSAN false positive with visibility=hidden
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80963 --- Comment #5 from Jan Engelhardt --- >Where would those magic numbers come from? We don't have anything like that. Maybe something similar to .build-id?, i.e. randomly-generated IDs (per .so) that merely serve to distinguish two structs. >>some -f option to always make UBSAN treat same-name classes as the same thing >>irrespective of visibility. I think I now found that as -fvisibility-ms-compat. >By using visibility other than default, you intentionally depart from the C++ >ODR rules I see. Then however the manpage should perhaps be updated to sport some stronger language, since it currently rather encourages the use of visibility and even lists the few conditions that need to be met. """It is strongly recommended that you use this in any shared objects you distribute.""" """-fvisibility does affect C++ vague linkage entities. This means that, for instance, an exception class that is be thrown between DSOs must be explicitly marked with default visibility so that the type_info nodes are unified between the DSOs."""
[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 --- Comment #4 from Martin Liška --- So there's explanation what happens: 1) w/o -fsanitize=address: decide_copy_try_finally returns true and so that we copy BB that contains finally statement: foo () { int n; int D.1806; bar (&n); i.0_1 = i; switch (i.0_1) , case 1: > : i.1_2 = i; switch (i.1_2) > : D.1806 = 0; goto ; goto ; : D.1806 = 0; goto ; : n = {CLOBBER}; goto ; : n = {CLOBBER}; goto ; : return; : return D.1806; } then CFG pass removes the dead BBs. All works fine. 2) w/ -fsanitize=address the decide_copy_try_finally returns false and thus we create switch to dispatch from the finally statement: foo () { int finally_tmp.2; int n; int D.2128; ASAN_MARK (UNPOISON, &n, 4); bar (&n); i.0_1 = i; switch (i.0_1) , case 1: > : i.1_2 = i; switch (i.1_2) > : D.2128 = 0; finally_tmp.2 = 0; goto ; goto ; : D.2128 = 0; finally_tmp.2 = 0; goto ; : finally_tmp.2 = 1; : ASAN_MARK (POISON, &n, 4); switch (finally_tmp.2) , case 1: > : goto ; : goto ; : return; : return D.2128; } Then CFG removes: Removing basic block 7 ;; basic block 7, loop depth 0 ;; pred: 5 finally_tmp.2 = 1; ;; succ: 8 now finally_tmp.2 can have only one value, but the switch statement, as well as the problematic return BB are not removed.
[Bug tree-optimization/81003] [8 Regression] ICE: tree check: expected ssa_name, have integer_cst in optimize_range_tests_to_bit_test, at tree-ssa-reassoc.c:2782
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81003 --- Comment #3 from Jakub Jelinek --- Created attachment 41500 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41500&action=edit gcc8-pr81003.patch We can't allow ->op to be something other than SSA_NAME or NULL (the latter means GIMPLE_COND at the end of some bb), because we need e.g. corresponding stmt iterator to know where to insert related stuff. The reason why we get an integer in ->op is that there is almost no cleanup after cunroll pass before reassoc is invoked, so gimple fold during force_gimple_operand_gsi is successful in optimizing it into a constant. This untested patch ensures we have an SSA_NAME and therefore also stmt iterator for it.
[Bug c/80959] -Wreturn-type "control reaches end of non-void function" false positive with -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80959 --- Comment #5 from Martin Liška --- Can be also simulated with ObjC: $ cat /tmp/objc.m volatile int i; int foo (void) { @try { switch (i) { case 1: switch (i) { default: return 0; } break; default: return 0; } } @finally { i = 2; } } $ gcc /tmp/objc.m -fobjc-exceptions -c -Wall /tmp/objc.m: In function ‘foo’: /tmp/objc.m:23:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ But as the function decide_copy_try_finally depends on optimization level: $ gcc /tmp/objc.m -fobjc-exceptions -c -Wall -O1 [nothing]
[Bug sanitizer/80932] UBSAN: false positive as a result of distribution: c1*(c2*v1-c3*v2)=>c1*c2*v1-c1*c3*v2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80932 --- Comment #7 from Marek Polacek --- Can't reproduce. What arch, is that gcc or g++, ...
[Bug libstdc++/81017] Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 --- Comment #3 from Sagar Shah --- thanks for taking a look at this. Are we going to have noexcept added in the function move ctor.?
[Bug sanitizer/80932] UBSAN: false positive as a result of distribution: c1*(c2*v1-c3*v2)=>c1*c2*v1-c1*c3*v2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80932 --- Comment #8 from Markus Trippelsdorf --- https://gcc.gnu.org/ml/gcc-regression/2017-06/msg00104.html https://gcc.gnu.org/ml/gcc-regression/2017-06/msg00105.html https://gcc.gnu.org/ml/gcc-regression/2017-06/msg00107.html
[Bug sanitizer/80932] UBSAN: false positive as a result of distribution: c1*(c2*v1-c3*v2)=>c1*c2*v1-c1*c3*v2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80932 --- Comment #9 from Markus Trippelsdorf --- trunk (checking=release): trippels@gcc67 gcc % gcc -O0 -fsanitize=undefined ./gcc/testsuite/c-c++-common/ubsan/pr80932.c trippels@gcc67 gcc % ./a.out gcc/testsuite/c-c++-common/ubsan/pr80932.c:10:88: runtime error: signed integer overflow: -9024801181724640896 - 228867929910118694 cannot be represented in type 'long int'
[Bug target/73350] AVX512: GCC optimizes away rounding flags
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73350 --- Comment #8 from Kirill Yukhin --- Author: kyukhin Date: Thu Jun 8 11:24:50 2017 New Revision: 249009 URL: https://gcc.gnu.org/viewcvs?rev=249009&root=gcc&view=rev Log: [PR73350][PR80862] Improve subst for RC-capable insns. PR target/73350,80862 gcc/ * config/i386/subst.md (round): Fix round pattern. * config/i386/i386.c (ix86_erase_embedded_rounding): Fix erasing rounding for the fixed pattern. gcc/testsuite/ * gcc.target/i386/pr73350.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr73350.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/config/i386/subst.md trunk/gcc/testsuite/ChangeLog
[Bug sanitizer/80953] Support libsanitizer on Solaris
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80953 --- Comment #7 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #6 from Maxim Ostapenko --- [...] > For ODR violation bug we have a local patch in libsanitizer. Could you check > whether you applied all local patches listed in libsanitizer/LOCAL_PATCHES > file? excellent, I totally missed that. As the saying goes: a day of debugging can save you an hour in the library ;-) With those patches applied (two of them have already been integrated upstream, r241978 and r243014), the ODR violation failures are gone. Thanks a lot. Rainer
[Bug tree-optimization/61171] vectorization fails for a reduction in presence of subtraction
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61171 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Last reconfirmed|2015-04-29 00:00:00 |2017-6-8 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener --- Reconfirmed, mine.
[Bug tree-optimization/60510] SLP blocks loop vectorization (with reduction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60510 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Last reconfirmed|2016-09-05 00:00:00 |2017-6-8 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #5 from Richard Biener --- Reconfirmed.
[Bug sanitizer/80932] UBSAN: false positive as a result of distribution: c1*(c2*v1-c3*v2)=>c1*c2*v1-c1*c3*v2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80932 --- Comment #10 from Marek Polacek --- Reproduced with -m32 on x86_64. Silly me. Will fix. pr80932.c:10:88: runtime error: signed integer overflow: -413853711 * -6 cannot be represented in type 'long int'
[Bug c++/81011] [6/7/8 Regression] ICE with #pragma omp task and inaccessible copy-constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81011 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Created attachment 41501 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41501&action=edit gcc8-pr81011.patch Untested fix.
[Bug sanitizer/80932] UBSAN: false positive as a result of distribution: c1*(c2*v1-c3*v2)=>c1*c2*v1-c1*c3*v2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80932 --- Comment #11 from Marek Polacek --- Author: mpolacek Date: Thu Jun 8 12:38:27 2017 New Revision: 249010 URL: https://gcc.gnu.org/viewcvs?rev=249010&root=gcc&view=rev Log: PR sanitize/80932 * c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/ubsan/pr80932.c
[Bug c/81006] ICE with zero-size array and #pragma omp task depend
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81006 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Created attachment 41502 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41502&action=edit gcc8-pr81006.patch The testcase is not valid. Anyway, here is the untested fix.
[Bug libstdc++/81017] Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 --- Comment #4 from Jonathan Wakely --- Yes, and the move assignment operator.
[Bug c++/65816] Constructor delegation does not perform zero-initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65816 Jonathan Wakely changed: What|Removed |Added Last reconfirmed|2015-04-20 00:00:00 |2017-6-8 --- Comment #1 from Jonathan Wakely --- Probably not related to constructor delegation, because we also don't zero-init the object in this case: inline void* operator new(decltype(sizeof(0)), void* p) noexcept { return p; } inline void operator delete (void*, void*) noexcept { } struct X { int i; X() = default; X(int) { } }; struct Y : X { Y() : X() { } }; int main() { alignas(Y) char buf[sizeof(Y)] = { 1, 1, 1, 1 }; ::new(buf) Y; if (buf[0] || buf[1] || buf[2] || buf[3]) throw 1; } If the unused X(int) constructor isn't provided then we get the zero-init, so it seems that the presence of *any* user-provided constructor affects the interpretation of [dcl.init] p8, but it should only be affected by a user-provided *default* constructor: To value-initialize an object of type T means: — if T is a (possibly cv-qualified) class type (Clause 12) with either no default constructor (15.1) or a default constructor that is user-provided or deleted, then the object is default-initialized; — if T is a (possibly cv-qualified) class type without a user-provided or deleted default constructor, then the object is zero-initialized and the semantic constraints for default-initialization are checked, and if T has a non-trivial default constructor, the object is default-initialized; In the example that delegates to the default ctor there must be a user-provided ctor to do the delegation, so it hits this bug. This seems to be present in all GCC releases.
[Bug target/80982] gcc.target/powerpc/builtins-3-runnable.c fails starting with its introduction in r248846
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80982 --- Comment #3 from wschmidt at linux dot vnet.ibm.com --- Hi Carl, Just FYI, now that you've fixed the bug, and there are no plans to backport the patch, you should go ahead and set the status of the bug to RESOLVED FIXED. I know this differs from community to community, so wanted to let you know how we do it. Thanks for the quick attention to the bug report! Bill > On Jun 7, 2017, at 5:04 PM, carll at gcc dot gnu.org > wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80982 > > --- Comment #2 from Carl Love --- > Author: carll > Date: Wed Jun 7 22:03:48 2017 > New Revision: 248997 > > URL: https://gcc.gnu.org/viewcvs?rev=248997&root=gcc&view=rev > Log: > gcc/ChangeLog: > > 2017-06-07 Carl Love > >PR target/80982 >* config/rs6000/altivec.md (double2): Fix the implementation of >for BE. > > Modified: >trunk/gcc/ChangeLog >trunk/gcc/config/rs6000/altivec.md > > -- > You are receiving this mail because: > You are on the CC list for the bug.
[Bug target/80982] gcc.target/powerpc/builtins-3-runnable.c fails starting with its introduction in r248846
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80982 --- Comment #4 from Bill Schmidt --- Sorry, that was intended to be a PM...
[Bug tree-optimization/81018] [8 regression] gfortran.dg/graphite/pr14741.f90 FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81018 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 CC||rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- Also seen on darwin with -m64.
[Bug tree-optimization/81018] [8 regression] gfortran.dg/graphite/pr14741.f90 FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81018 Richard Biener changed: What|Removed |Added CC||amker at gcc dot gnu.org --- Comment #2 from Richard Biener --- Caused by r248965 | amker | 2017-06-07 13:31:44 +0200 (Wed, 07 Jun 2017) | 2 lines * passes.def (pass_iv_canon): Move before pass_loop_distribution.
[Bug c++/65816] Constructor delegation does not perform zero-initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65816 Jonathan Wakely changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #2 from Jonathan Wakely --- Hmm, for the original example in comment 0 we do use build_value_init, but this branch is not taken: else if (TYPE_HAS_COMPLEX_DFLT (type)) { /* This is a class that needs constructing, but doesn't have a user-provided constructor. So we need to zero-initialize the object and then call the implicitly defined ctor. This will be handled in simplify_aggr_init_expr. */ AGGR_INIT_ZERO_FIRST (ctor) = 1; return ctor; } But for my example in comment 1 there is no call to build_value_init, even though X() should perform value-initialization. So maybe these are two separate bugs.
[Bug tree-optimization/81018] [8 regression] gfortran.dg/graphite/pr14741.f90 FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81018 amker at gcc dot gnu.org changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |amker at gcc dot gnu.org --- Comment #3 from amker at gcc dot gnu.org --- Sorry for disturbing, I will do investigation.
[Bug sanitizer/80973] ICE with lambda and -fsanitize=undefined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80973 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed.
[Bug libstdc++/81017] Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 --- Comment #5 from Sagar Shah --- (In reply to Jonathan Wakely from comment #4) > Yes, and the move assignment operator. cool.. thanks!
[Bug sanitizer/80973] ICE with lambda and -fsanitize=undefined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80973 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Looking at this.
[Bug libstdc++/81017] Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 --- Comment #6 from Jonathan Wakely --- Author: redi Date: Thu Jun 8 14:27:45 2017 New Revision: 249018 URL: https://gcc.gnu.org/viewcvs?rev=249018&root=gcc&view=rev Log: PR libstdc++/81017 add noexcept to std::function move operations PR libstdc++/81017 * include/bits/std_function.h (function::function(function&&)) (function::operator=(funtion&&)): Add noexcept. * testsuite/20_util/function/assign/move.cc: Check for noexcept. * testsuite/20_util/function/cons/move.cc: Likewise. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/std_function.h trunk/libstdc++-v3/testsuite/20_util/function/assign/move.cc trunk/libstdc++-v3/testsuite/20_util/function/cons/move.cc
[Bug rtl-optimization/81019] New: [6/7/8 Regression] wrong code with -O -fno-tree-ccp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81019 Bug ID: 81019 Summary: [6/7/8 Regression] wrong code with -O -fno-tree-ccp Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Build: x86_64-pc-linux-gnu Created attachment 41503 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41503&action=edit reduced testcase Output: $ x86_64-pc-linux-gnu-gcc -O -fno-tree-ccp testcase.c $ ./a.out Aborted $ /repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-248824-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-248824-checking-yes-rtl-df-extra-nographite-amd64 Thread model: posix gcc version 8.0.0 20170602 (experimental) (GCC)
[Bug rtl-optimization/81020] New: [6/7/8 Regression] wrong code with -O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81020 Bug ID: 81020 Summary: [6/7/8 Regression] wrong code with -O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Build: x86_64-pc-linux-gnu Created attachment 41504 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41504&action=edit reduced testcase Output: $ x86_64-pc-linux-gnu-gcc -O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp testcase.c $ ./a.out Aborted $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-248824-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-248824-checking-yes-rtl-df-extra-nographite-amd64 Thread model: posix gcc version 8.0.0 20170602 (experimental) (GCC)
[Bug tree-optimization/81009] missing aliasing optimization for const restrict pointers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81009 --- Comment #2 from Martin Sebor --- Yes, the constness can be cast away without changing the effect of the rule. Similar to the C++ rule we discussed in bug 80794 I feel that constness is an underappreciated opportunity to generate better code in both languages. I agree that constness alone is not sufficient to rely on for optimization because it can be cast away and the object modified, but in conjunction with restrict in C and with other rules in C++ (as discussed in bug 80794) I think it's worth looking into.
[Bug sanitizer/81021] New: stack-use-after-scope false positive error with exceptions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81021 Bug ID: 81021 Summary: stack-use-after-scope false positive error with exceptions Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: matt at godbolt dot org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- GCC 7.1 compiled from source, testing on Ubuntu and Arch linux. The following minimal reproduction code: ---snip--- #include struct ConfigFile { ConfigFile(std::string filename, std::string delimiter) { throw "error"; } }; struct Configuration { ConfigFile _configFile; Configuration(const std::string &root, const char *baseName) : _configFile(root + baseName, "=") { } }; void test() { std::string root("etc"); try { Configuration config(root, "notthere"); } catch (...) { // exception is thrown, caught here and ignored... } Configuration config(root, "sample"); // ASAN error during constructor here } int main(int argc, const char *argv[]) { test(); } ---snip--- when compiled and run with the address sanitizer with `g++ -fsanitize=address test.cc -o test` gives the following apparent false positive. = ==44114==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffd3b2bf6f0 at pc 0x004fa7bf bp 0x7ffd3b2bf660 sp 0x7ffd3b2bf658 WRITE of size 32 at 0x7ffd3b2bf6f0 thread T0 #0 0x4fa7be in Configuration::Configuration(std::__cxx11::basic_string, std::allocator > const&, char const*) (/home/mgodbolt/dev/gcc7-bug/test+0x4fa7be) #1 0x4fa4b9 in test() (/home/mgodbolt/dev/gcc7-bug/test+0x4fa4b9) #2 0x4fa5de in main (/home/mgodbolt/dev/gcc7-bug/test+0x4fa5de) #3 0x2b6b74945f44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) #4 0x405ebb (/home/mgodbolt/dev/gcc7-bug/test+0x405ebb) Address 0x7ffd3b2bf6f0 is located in stack of thread T0 at offset 96 in frame #0 0x4fa689 in Configuration::Configuration(std::__cxx11::basic_string, std::allocator > const&, char const*) (/home/mgodbolt/dev/gcc7-bug/test+0x4fa689) This frame has 3 object(s): [32, 33) '' [96, 128) '' <== Memory access at offset 96 is inside this variable [160, 192) '' HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-use-after-scope (/home/mgodbolt/dev/gcc7-bug/test+0x4fa7be) in Configuration::Configuration(std::__cxx11::basic_string, std::allocator > const&, char const*) Shadow bytes around the buggy address: 0x10002764fe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002764fe90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002764fea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002764feb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002764fec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x10002764fed0: 00 00 f1 f1 f1 f1 01 f2 f2 f2 f2 f2 f2 f2[f8]f8 0x10002764fee0: f8 f8 f2 f2 f2 f2 f8 f8 f8 f8 f3 f3 f3 f3 00 00 0x10002764fef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002764ff00: 00 00 f8 00 00 00 00 00 00 00 01 00 00 00 00 00 0x10002764ff10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10002764ff20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Reducing the file further (removing the apparently unnecessary std::strings) prevents this issue from being flagged up.
[Bug middle-end/79990] [CHKP] ICE in expand_expr_addr_expr_1, at expr.c:7790
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79990 Alexander Ivchenko changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||aivchenk at gcc dot gnu.org Resolution|--- |FIXED --- Comment #3 from Alexander Ivchenko --- Fixed with r249015: Author: aivchenk Date: Thu Jun 8 14:07:21 2017 + gcc/ChangeLog: 2017-05-09 Alexander Ivchenko * tree-chkp.c (chkp_get_hard_register_var_fake_base_address): New function. (chkp_get_hard_register_fake_addr_expr): Ditto. (chkp_build_addr_expr): Add check for hard reg case. (chkp_parse_array_and_component_ref): Ditto. (chkp_find_bounds_1): Ditto. (chkp_process_stmt): Don't generate bounds store for hard reg case.
[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530 Bug 65530 depends on bug 79990, which changed state. Bug 79990 Summary: [CHKP] ICE in expand_expr_addr_expr_1, at expr.c:7790 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79990 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug target/80982] gcc.target/powerpc/builtins-3-runnable.c fails starting with its introduction in r248846
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80982 Carl Love changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Carl Love --- Fix submitted upstream
[Bug target/80982] gcc.target/powerpc/builtins-3-runnable.c fails starting with its introduction in r248846
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80982 Carl Love changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-06-08 Assignee|unassigned at gcc dot gnu.org |carll at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #5 from Carl Love --- Taking the bug, Fix has been submitted.
[Bug c++/81022] New: invalid address with pointer type casting
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81022 Bug ID: 81022 Summary: invalid address with pointer type casting Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vvsed at hotmail dot com Target Milestone: --- Created attachment 41505 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41505&action=edit same source code /* D:\Tools\MinGW64\bin\g++.exe -m64 -O2 -Wall -save-temps gcerr_1.cpp -ovx_class_gc Compiler: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/ MinGW 7.1 and below OS: Windows 7 or Linux 64-bit on Intel x64 invalid address with pointer type casting */ #include #include typedef long long int type; typedst[2]; void srt(type *src) { type*p, t; p = src + 1; t = p[0]; p--; if (src[1] < src[0]) { p[1] = p[0]; p--; } #if __SSE2__ _mm_store_sd((double *)(p + 1), _mm_load_sd((double *)&t)); //invalid address // _mm_storel_epi64((__m128i *)(p + 1), _mm_loadl_epi64((__m128i *)&t)); //ok #else p[1] = t; //ok #endif dst[0] = src[0]; dst[1] = src[1]; } int main() { typesrc[2] = {1, 0}; srt(src); fprintf(stdout, "%lld %lld", dst[0], dst[1]); //prints "1 1" instead of "0 1" return 0; }
[Bug sanitizer/81021] stack-use-after-scope false positive error with exceptions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81021 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-08 Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Mine, I'll take a look.
[Bug sanitizer/81023] New: False positiv stack-use-after-scope (worked with GCC 6, fails with GCC 7)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81023 Bug ID: 81023 Summary: False positiv stack-use-after-scope (worked with GCC 6, fails with GCC 7) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: d.frey at gmx dot de CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- Created attachment 41506 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41506&action=edit Minimal program to reproduce the problem I got a report from address sanitizer about a stack-use-after-scope, which I believe is a false positive. I managed to shrink the code down to 99 lines, but no further (that already took 2.5 days). Code properties: - No includes - No templates - No loops - No recursion - No heap allocations - Compiles cleanly with -pedantic -Wall -Wextra -Werror Problem properties: - Using GCC 6 (and its address sanitizer) solves the problem, only GCC 7 reports it. - Some flags like -O0 or -O3 solve the problem, -O1 still produces it. - Using -fno-inline solves the problem. - Almost every change to the code in order to simplify it will solve the problem. I'm at a total loss as to what is wrong and I am pretty sure the code itself it not accessing the stack after the scope is gone. The area I am suspicious about is: I'm throwing an exception and the destructor of the class "marker" is writing some bytes (assignment of "iterator"). Is this confusing the address sanitizer? My system (g++ --version): g++-7 (Ubuntu 7.1.0-5ubuntu2~14.04) 7.1.0 Output: frey@vbox::~/work/test/address_sanitizer_false_positive$ g++-7 -std=c++14 -pedantic -Wall -Wextra -Werror -fsanitize=address -fuse-ld=gold -O1 -g t.cpp -o t && ./t = ==17925==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fff9bd67ef0 at pc 0x00401112 bp 0x7fff9bd67e80 sp 0x7fff9bd67e78 WRITE of size 24 at 0x7fff9bd67ef0 thread T0 #0 0x40 in marker::marker(iterator&) /home/frey/work/test/address_sanitizer_false_positive/t.cpp:22 #1 0x40 in input::mark() /home/frey/work/test/address_sanitizer_false_positive/t.cpp:59 #2 0x40 in rule::match(input&) /home/frey/work/test/address_sanitizer_false_positive/t.cpp:71 #3 0x40 in match(input&) /home/frey/work/test/address_sanitizer_false_positive/t.cpp:81 #4 0x40141f in verify_fail(char const*) /home/frey/work/test/address_sanitizer_false_positive/t.cpp:88 #5 0x4014c0 in main /home/frey/work/test/address_sanitizer_false_positive/t.cpp:97 #6 0x7f30c3f75f44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) #7 0x400ca8 (/home/frey/work/test/address_sanitizer_false_positive/t+0x400ca8) Address 0x7fff9bd67ef0 is located in stack of thread T0 at offset 96 in frame #0 0x400d66 in match(input&) /home/frey/work/test/address_sanitizer_false_positive/t.cpp:79 This frame has 2 object(s): [32, 64) 'm' [96, 128) 'm' <== Memory access at offset 96 is inside this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-use-after-scope /home/frey/work/test/address_sanitizer_false_positive/t.cpp:22 in marker::marker(iterator&) Shadow bytes around the buggy address: 0x1000737a4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000737a4f90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000737a4fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000737a4fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000737a4fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x1000737a4fd0: 00 00 f1 f1 f1 f1 00 00 00 00 f2 f2 f2 f2[f8]f8 0x1000737a4fe0: f8 f8 f3 f3 f3 f3 00 00 00 00 00 00 f1 f1 f1 f1 0x1000737a4ff0: 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00 0x1000737a5000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000737a5010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000737a5020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user:f7 Container overflow: fc Array cookie:ac Intra object redzone:bb ASan internal: fe Left alloca redzone: ca Right alloca redzone:cb =
[Bug lto/81004] [7/8 Regression] linking failed with -flto and static libboost_program_options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 --- Comment #12 from Azat --- > Started with r238959. If you revert this then it fixes some of problems (even though this is a temporary solution), but there are more, and now this is *only without -flto* (i.e. -Wall "-Werror -Wunknown-pragmas -Wextra -Wwrite-strings -std=c++1z -g3 '-rdynamic"): /usr/include/c++/7.1.1/bits/regex.h:235: undefined reference to `std::__cxx11::basic_string, std::allocator >::data()' /usr/include/c++/7.1.1/bits/regex.h:235: undefined reference to `std::__cxx11::basic_string, std::allocator >::data()' I will try to get a small reproducer later.
[Bug sanitizer/80973] ICE with lambda and -fsanitize=undefined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80973 --- Comment #3 from Jakub Jelinek --- Created attachment 41507 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41507&action=edit gcc8-pr80973.patch Untested fix.
[Bug c++/81024] New: ICE within convert_like_real
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81024 Bug ID: 81024 Summary: ICE within convert_like_real Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- Found by Alec Teal; reported to me over IRC. Seen with gcc 4.8 and with trunk (r248825). $ cat main.cc namespace std { template class initializer_list; } void WtfTest(int, const char*, const char*, const ::std::initializer_list&); #define WTF(...) WtfTest(__LINE__,__FILE__,"potato",{__VA_ARGS__}); int main() { WTF("it","works") } gcc main.cc main.cc: In function ‘int main()’: main.cc:5:66: internal compiler error: Segmentation fault #define WTF(...) WtfTest(__LINE__,__FILE__,"potato",{__VA_ARGS__}); ^ main.cc:6:14: note: in expansion of macro ‘WTF’ int main() { WTF("it","works") } ^~~ 0xb7f806 crash_signal ../../src/gcc/toplev.c:338 0x60797d convert_like_real ../../src/gcc/cp/call.c:6805 0x6076bc convert_like_real ../../src/gcc/cp/call.c:6838 0x60a4cd build_over_call ../../src/gcc/cp/call.c:7840 0x61250e build_new_function_call(tree_node*, vec**, int) ../../src/gcc/cp/call.c:4262 0x727d25 finish_call_expr(tree_node*, vec**, bool, bool, int) ../../src/gcc/cp/semantics.c:2479 0x6c990d cp_parser_postfix_expression ../../src/gcc/cp/parser.c:6998 0x6d0446 cp_parser_unary_expression ../../src/gcc/cp/parser.c:8117 0x6d0f65 cp_parser_cast_expression ../../src/gcc/cp/parser.c:8796 0x6d1562 cp_parser_binary_expression ../../src/gcc/cp/parser.c:8898 0x6d1cb2 cp_parser_assignment_expression ../../src/gcc/cp/parser.c:9186 0x6d923a cp_parser_expression ../../src/gcc/cp/parser.c:9353 0x6da32a cp_parser_expression_statement ../../src/gcc/cp/parser.c:10912 0x6c5376 cp_parser_statement ../../src/gcc/cp/parser.c:10728 0x6c6377 cp_parser_statement_seq_opt ../../src/gcc/cp/parser.c:11054 0x6c642f cp_parser_compound_statement ../../src/gcc/cp/parser.c:11008 0x6e1330 cp_parser_function_body ../../src/gcc/cp/parser.c:21447 0x6e1330 cp_parser_ctor_initializer_opt_and_function_body ../../src/gcc/cp/parser.c:21483 0x6e1b2e cp_parser_function_definition_after_declarator ../../src/gcc/cp/parser.c:26291 0x6e2a9c cp_parser_function_definition_from_specifiers_and_declarator ../../src/gcc/cp/parser.c:26203
[Bug lto/81004] [7/8 Regression] linking failed with -flto and static libboost_program_options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 --- Comment #13 from Jonathan Wakely --- If you undo that change then you can't link C++17 programs using std::string at all, not just using LTO. That's why the change was done in the first place.
[Bug middle-end/79988] [7/8 Regression][CHKP] ICE in tree check: accessed operand 5 of call_expr with 4 operands in ix86_expand_builtin, at config/i386/i386.c:36851
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79988 --- Comment #4 from Alexander Ivchenko --- Author: aivchenk Date: Thu Jun 8 16:05:59 2017 New Revision: 249023 URL: https://gcc.gnu.org/viewcvs?rev=249023&root=gcc&view=rev Log: 2017-06-08 Alexander Ivchenko PR middle-end/79988 * tree-chkp.c (chkp_gimple_call_builtin_p): Remove gimple_call_builtin_p call. 017-06-08 Alexander Ivchenko PR middle-end/79988 * gcc.target/i386/mpx/pr79988.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/mpx/pr79988.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-chkp.c
[Bug c++/81024] ICE within convert_like_real with std::initializer_list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81024 David Malcolm changed: What|Removed |Added Summary|ICE within |ICE within |convert_like_real |convert_like_real with ||std::initializer_list --- Comment #1 from David Malcolm --- Segfault is a read through NULL in convert_like_real at line 6805 here, within the handling for: /* Conversion to std::initializer_list. */ (gdb) list 6800 6801 /* Build up the initializer_list object. */ 6802 totype = complete_type (totype); 6803 field = next_initializable_field (TYPE_FIELDS (totype)); 6804 CONSTRUCTOR_APPEND_ELT (vec, field, array); >>6805 field = next_initializable_field (DECL_CHAIN (field)); 6806 CONSTRUCTOR_APPEND_ELT (vec, field, size_int (len)); 6807 new_ctor = build_constructor (totype, vec); 6808 return get_target_expr_sfinae (new_ctor, complain); 6809} (gdb) p field $1 =
[Bug sanitizer/81021] stack-use-after-scope false positive error with exceptions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81021 --- Comment #2 from Matt Godbolt --- Thanks Martin!
[Bug middle-end/66462] GCC isinf/isnan/... builtins cause sNaN exceptions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66462 --- Comment #6 from joseph at codesourcery dot com --- I thought this was fixed only for certain floating-point formats - and even for those, not globally for all targets (not for binary128 on 32-bit targets)?
[Bug libstdc++/81017] Class with vector of unique_ptr and std::function does not compile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81017 --- Comment #7 from Jonathan Wakely --- Fixed on trunk, I'm planning to backport it to the branches too.
[Bug fortran/52473] CSHIFT slow - inline it?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52473 --- Comment #6 from Thomas Koenig --- Created attachment 41508 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41508&action=edit What an unrolled cshift could look like This is what an unrolled version of cshift could look like, for a simple one-dimensional case. If the shifts are constants, all the if statements are optimized away at compile-time, so it is quite efficient.
[Bug c++/78620] C++11, Padding bytes not zero-intialized when POD is initialized with compiler generated default constructor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78620 Jonathan Wakely changed: What|Removed |Added Target||aarch64-linux Status|WAITING |NEW Last reconfirmed|2016-12-01 00:00:00 |2017-6-8 Known to fail||6.3.1 --- Comment #4 from Jonathan Wakely --- Confirmed on aarch64 with Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/6.3.1/lto-wrapper Target: aarch64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --disable-libmpx --enable-gnu-indirect-function --build=aarch64-redhat-linux Thread model: posix gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC) Tweaked testcase using the correct terminology: #include #include #include #include void print(struct tm* tt) { fprintf(stderr, "{%d, %d, %d, %d, %d, %d, %d, %d, %d, %ld, %p}\n", tt->tm_sec, tt->tm_min, tt->tm_hour, tt->tm_mday, tt->tm_mon, tt->tm_year, tt->tm_wday, tt->tm_yday, tt->tm_isdst, tt->tm_gmtoff, tt->tm_zone); char* p = (char*)tt; fprintf(stderr, "%ld\n", sizeof(tm)); for (size_t i = 0; i < sizeof(tm); ++i) { fprintf(stderr, "%02x ", (unsigned char)p[i]); } fprintf(stderr, "\n"); } int main(void) { struct tm tt1; fprintf(stderr, "default-initialization\n"); print(&tt1); struct tm tt2 = tm(); fprintf(stderr, "value-initialization\n"); print(&tt2); struct tm tt3{}; fprintf(stderr, "copy-list-initialization\n"); print(&tt3); struct tm tt4 = {}; fprintf(stderr, "value-list-initialization\n"); print(&tt4); { char buf[sizeof(tm)]; memset(buf, 0xFF, sizeof(tm)); new (buf) tm; fprintf(stderr, "placement new default-initialization\n"); print(reinterpret_cast(buf)); } { char buf[sizeof(tm)]; memset(buf, 0xFF, sizeof(tm)); new (buf) tm(); fprintf(stderr, "placement new with value-initialization\n"); print(reinterpret_cast(buf)); } { char buf[sizeof(tm)]; memset(buf, 0xFF, sizeof(tm)); new (buf) tm{}; fprintf(stderr, "placement new with list-initialization\n"); print(reinterpret_cast(buf)); } } aarch64 output: default-initialization {-1758476368, 127, 4197200, 0, 0, 0, -362443216, 127, -1758476340, 4197200, (nil)} 56 b0 c7 2f 97 7f 00 00 00 50 0b 40 00 00 00 00 00 00 00 00 00 00 00 00 00 30 8e 65 ea 7f 00 00 00 cc c7 2f 97 7f 00 00 00 50 0b 40 00 00 00 00 00 00 00 00 00 00 00 00 00 value-initialization {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (nil)} 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 copy-list-initialization {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (nil)} 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 value-list-initialization {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (nil)} 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 placement new default-initialization {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0x} 56 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff placement new with value-initialization {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (nil)} 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 placement new with list-initialization {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (nil)} 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 The list-initialization cases zero the padding bytes, but t he value-initialization cases don't.
[Bug target/71151] [avr] -fmerge-constants and -fdata-sections/-ffunction-sections results in string constants in .progmem.gcc_sw section
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71151 Georg-Johann Lay changed: What|Removed |Added Target Milestone|--- |6.2
[Bug target/59874] Missing builtin (__builtin_clzs) when compiling with g++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59874 --- Comment #16 from uros at gcc dot gnu.org --- Author: uros Date: Thu Jun 8 17:28:19 2017 New Revision: 249028 URL: https://gcc.gnu.org/viewcvs?rev=249028&root=gcc&view=rev Log: PR target/81015 Revert: 2016-12-14 Uros Bizjak PR target/59874 * config/i386/i386.md (*ctzhi2): New insn_and_split pattern. (*clzhi2): Ditto. testsuite/ChangeLog: PR target/81015 * gcc.target/i386/pr59874-1.c (foo): Call __builtin_ctzs. * gcc.target/i386/pr59874-2.c (foo): Call __builtin_clzs. * gcc.target/i386/pr81015.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr81015.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.md trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/i386/pr59874-1.c trunk/gcc/testsuite/gcc.target/i386/pr59874-2.c
[Bug target/81015] Bad codegen for __builtin_clz(unsigned short)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81015 --- Comment #3 from uros at gcc dot gnu.org --- Author: uros Date: Thu Jun 8 17:28:19 2017 New Revision: 249028 URL: https://gcc.gnu.org/viewcvs?rev=249028&root=gcc&view=rev Log: PR target/81015 Revert: 2016-12-14 Uros Bizjak PR target/59874 * config/i386/i386.md (*ctzhi2): New insn_and_split pattern. (*clzhi2): Ditto. testsuite/ChangeLog: PR target/81015 * gcc.target/i386/pr59874-1.c (foo): Call __builtin_ctzs. * gcc.target/i386/pr59874-2.c (foo): Call __builtin_clzs. * gcc.target/i386/pr81015.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr81015.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.md trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/i386/pr59874-1.c trunk/gcc/testsuite/gcc.target/i386/pr59874-2.c