[Bug ipa/82027] [5/6/7/8 Regression] wrong code with -O3 -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82027 --- Comment #5 from Martin Liška --- (In reply to Domani Hannes from comment #4) > (In reply to Martin Liška from comment #3) > > Note that original function does: > > > > void calcPercent( const char *name,int pos,int size ) > > { > > int percent = 100*pos/size; > > if( percent!=m_percent ) > > m_percent = percent; > > } > > > > So arguments are shifted by one. Martin can you please take a look? > > In div0.exe.ltrans0.000i.cgraph it looks like this: > > calcPercent.constprop (struct Combined * const this, int pos, int size) > > Could this have anything to do with the argument shift? Yes, it has. As I talked to Martin Jambor, he's aware of the bug and he'll prepare fix for that. Please be patient.
[Bug c++/82067] G++ has an internal compiler error in possible_polymorphic_call_targets, at ipa-devirt.c:1557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82067 --- Comment #4 from Martin Liška --- Can you please paste output of --save-temps?
[Bug c/82078] [8 Regression] wrong code at -O3 in both 32-bit and 64-bit modes on x86_64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82078 Martin Liška changed: What|Removed |Added Keywords||ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed||2017-09-04 CC||jamborm at gcc dot gnu.org Target Milestone|--- |8.0 Summary|wrong code at -O3 in both |[8 Regression] wrong code |32-bit and 64-bit modes on |at -O3 in both 32-bit and |x86_64-linux-gnu|64-bit modes on ||x86_64-linux-gnu Ever confirmed|0 |1 --- Comment #6 from Martin Liška --- Started with r247497.
[Bug testsuite/82093] gfortran.dg/vect/pr70043.f90 contains out-of-bounds references
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82093 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-09-04 Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Thanks for that, can be fixed by: diff --git a/gcc/testsuite/gfortran.dg/vect/pr70043.f90 b/gcc/testsuite/gfortran.dg/vect/pr70043.f90 index 36d6a0b3b90..bdd03a5bd10 100644 --- a/gcc/testsuite/gfortran.dg/vect/pr70043.f90 +++ b/gcc/testsuite/gfortran.dg/vect/pr70043.f90 @@ -6,7 +6,7 @@ subroutine fn1(a, b) real(8), intent(in) :: b(100) real(8), intent(inout) :: a(100) real(8) c - do i=0,100 + do i=0,99 if( a(i) < 0.0 ) then c = a(i) * b(i) a(i) = a(i) - c / b(i) Am I right?
[Bug bootstrap/82045] [8 regression] SPARC bootstrap broken: ICE in emit_library_call_value_1, at calls.c:4565
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82045 --- Comment #13 from rsandifo at gcc dot gnu.org --- Author: rsandifo Date: Mon Sep 4 07:30:53 2017 New Revision: 251637 URL: https://gcc.gnu.org/viewcvs?rev=251637&root=gcc&view=rev Log: PR82045: Avoid passing machine modes through "..." PR82045 is about a bootstrap failure on sparc-sun-solaris2.11. The problem was that we were passing the new machine_mode wrapper classes through "..." to emit_library_call(_value), which then read them back as ints instead. The simplest fix seemed to be replace "..." with an array of rtx_mode_ts, then provide wrappers for the common cases. This bulks out rtl.h a bit, but it does make things a bit more typesafe. 2017-09-04 Richard Sandiford gcc/ PR bootstrap/82045 * rtl.h (emit_library_call_value_1): Declare. (emit_library_call): Replace declaration with a series of overloads. Remove the parameter count argument. (emit_library_call_value): Likewise. * calls.c (emit_library_call_value_1): Make global. Replace varargs with an "rtx_mode_t *". (emit_library_call_value): Delete. (emit_library_call): Likewise. * asan.c (asan_emit_stack_protection): Update calls accordingly. (asan_emit_allocas_unpoison): Likewise. * builtins.c (expand_builtin_powi): Likewise. (expand_asan_emit_allocas_unpoison): Likewise. * cfgexpand.c (expand_main_function): Likewise. * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise. * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise. * config/alpha/alpha.c (alpha_trampoline_init): Likewise. * config/arm/arm.c (arm_trampoline_init): Likewise. (arm_call_tls_get_addr): Likewise. (arm_expand_divmod_libfunc): Likewise. * config/bfin/bfin.md (umulsi3_highpart): Likewise. (smulsi3_highpart): Likewise. * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise. (c6x_expand_compare): Likewise. (c6x_expand_movmem): Likewise. * config/frv/frv.c (frv_trampoline_init): Likewise. * config/i386/i386.c (ix86_trampoline_init): Likewise. (ix86_expand_divmod_libfunc): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. (ia64_expand_compare): Likewise. (ia64_profile_hook): Likewise. * config/ia64/ia64.md (save_stack_nonlocal): Likewise. (nonlocal_goto): Likewise. (restore_stack_nonlocal): Likewise. * config/m32r/m32r.c (block_move_call): Likewise. (m32r_trampoline_init): Likewise. * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise. * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise. (m68k_call_m68k_read_tp): Likewise. * config/microblaze/microblaze.c (microblaze_call_tls_get_addr) (microblaze_expand_divide): Likewise. * config/mips/mips.h (mips_args): Likewise. * config/mips/sdemtk.h (mips_sync_icache): Likewise. (MIPS_ICACHE_SYNC): Likewise. * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise. (nios2_trampoline_init): Likewise. * config/pa/pa.c (hppa_tls_call): Likewise. (pa_trampoline_init): Likewise. * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise. * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address) (expand_strn_compare): Likewise. (rs6000_generate_compare): Likewise. (rs6000_expand_float128_convert): Likewise. (output_profile_hook): Likewise. (rs6000_trampoline_init): Likewise. * config/powerpcspe/powerpcspe.md (neg2): Likewise. * config/riscv/riscv.h (PROFILE_HOOK): Likewise. * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_generate_compare): Likewise. (rs6000_expand_float128_convert): Likewise. (output_profile_hook): Likewise. (rs6000_trampoline_init): Likewise. * config/rs6000/rs6000.md (neg2): Likewise. * config/sh/sh.c (sh_trampoline_init): Likewise. * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise. (sparc_emit_float_lib_cmp): Likewise. (sparc32_initialize_trampoline): Likewise. (sparc64_initialize_trampoline): Likewise. (sparc_profile_hook): Likewise. * config/spu/spu.c (ea_load_store): Likewise. * config/spu/spu.md (floatunssidf2): Likewise. * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise. * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise. * config/visium/visium.c (expand_block_move_4): Likewise. (expand_block_move_2): Likewise. (expand_block_move_1): Likewise. (expand_block_set_4): Likewise. (expand_block_set_2): Likewise. (expand_block_set_1): Likewise. (visium_trampolin
[Bug c++/82069] [8 Regression] ICE: Segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82069 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2017-09-04 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Can't reproduce Markus..
[Bug c++/82082] [8 Regression] ICE: in tsubst, at cp/pt.c:13700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82082 Martin Liška changed: What|Removed |Added Keywords||ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed||2017-09-04 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Confirmed.
[Bug middle-end/82083] sanitizer detects signed integer overflow in tree-data-ref.c with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82083 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-09-04 CC||marxin at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org Target Milestone|--- |8.0 Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Confirmed, I'll take a look.
[Bug c++/82084] [5/6/7/8 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Known to work||4.7.4 Keywords||ice-on-valid-code Last reconfirmed||2017-09-04 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 Summary|internal compiler error:|[5/6/7/8 Regression] ICE: |constructing wstring with |constructing wstring with |-O3 |-O3 Known to fail||4.8.0 --- Comment #1 from Martin Liška --- Confirmed, started with GCC 4.8.0. We do: 3232 } 3233else 3234 op = fold_unary (VIEW_CONVERT_EXPR, 3235 TREE_TYPE (vector_type), op); 3236gcc_assert (op && CONSTANT_CLASS_P (op)); where op before folding is: (gdb) p debug_tree(op) unit-size align:32 warn_if_not_align:0 symtab:0 alias-set 9 canonical-type 0x2ab5040747e0 precision:32 min max pointer_to_this reference_to_this > sizes-gimplified type_6 DI size unit-size align:32 warn_if_not_align:0 symtab:0 alias-set 9 canonical-type 0x2ab504e71540 domain sizes-gimplified type_6 DI size unit-size align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x2ab504810bd0 precision:64 min max > pointer_to_this > readonly constant static "D\000\000\000\000\000\000\000"> and is NULL_TREE after the folding.
[Bug testsuite/82093] gfortran.dg/vect/pr70043.f90 contains out-of-bounds references
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82093 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- (In reply to Martin Liška from comment #1) > Thanks for that, can be fixed by: > --- a/gcc/testsuite/gfortran.dg/vect/pr70043.f90 > +++ b/gcc/testsuite/gfortran.dg/vect/pr70043.f90 > @@ -6,7 +6,7 @@ subroutine fn1(a, b) >real(8), intent(in) :: b(100) >real(8), intent(inout) :: a(100) >real(8) c > - do i=0,100 > + do i=0,99 No, but by do i =1,100. We need to check if r233933 still fails with that and r233934 doesn't. Let me do that.
[Bug c++/82085] [5/6/7/8 Regression] ICE: Template variable reference used in nested template alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82085 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Known to work||5.2.0 Keywords||ice-on-valid-code Last reconfirmed||2017-09-04 CC||jason at gcc dot gnu.org, ||marxin at gcc dot gnu.org Ever confirmed|0 |1 Summary|Crash: Template variable|[5/6/7/8 Regression] ICE: |reference used in nested|Template variable reference |template alias |used in nested template ||alias Known to fail||5.3.0, 5.4.0, 6.4.0, 7.2.0, ||8.0 --- Comment #2 from Martin Liška --- Confirmed, started on trunk with r226642. I haven't investigated 5 branch, but I bet it's a backport.
[Bug tree-optimization/70043] [6 Regression] The compiler hangs in a fortran test-case with -Ofast -g -march=haswell
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70043 --- Comment #3 from Jakub Jelinek --- Author: jakub Date: Mon Sep 4 07:52:06 2017 New Revision: 251638 URL: https://gcc.gnu.org/viewcvs?rev=251638&root=gcc&view=rev Log: PR tree-optimization/70043 PR testsuite/82093 * gfortran.dg/vect/pr70043.f90 (fn1): Start loop from 1 instead of 0. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/vect/pr70043.f90
[Bug testsuite/82093] gfortran.dg/vect/pr70043.f90 contains out-of-bounds references
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82093 --- Comment #3 from Jakub Jelinek --- Author: jakub Date: Mon Sep 4 07:52:06 2017 New Revision: 251638 URL: https://gcc.gnu.org/viewcvs?rev=251638&root=gcc&view=rev Log: PR tree-optimization/70043 PR testsuite/82093 * gfortran.dg/vect/pr70043.f90 (fn1): Start loop from 1 instead of 0. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/vect/pr70043.f90
[Bug testsuite/82093] gfortran.dg/vect/pr70043.f90 contains out-of-bounds references
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82093 --- Comment #4 from Martin Liška --- (In reply to Jakub Jelinek from comment #3) > Author: jakub > Date: Mon Sep 4 07:52:06 2017 > New Revision: 251638 > > URL: https://gcc.gnu.org/viewcvs?rev=251638&root=gcc&view=rev > Log: > PR tree-optimization/70043 > PR testsuite/82093 > * gfortran.dg/vect/pr70043.f90 (fn1): Start loop from 1 instead of 0. > > Modified: > trunk/gcc/testsuite/ChangeLog > trunk/gcc/testsuite/gfortran.dg/vect/pr70043.f90 Thanks Jakub for the fix.
[Bug tree-optimization/70043] [6 Regression] The compiler hangs in a fortran test-case with -Ofast -g -march=haswell
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70043 Bug 70043 depends on bug 82093, which changed state. Bug 82093 Summary: gfortran.dg/vect/pr70043.f90 contains out-of-bounds references https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82093 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug testsuite/82093] gfortran.dg/vect/pr70043.f90 contains out-of-bounds references
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82093 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek --- Fixed.
[Bug target/82094] error: inlining failed in call to always_inline ‘_mm512_permutexvar_epi8’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82094 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2017-09-04 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Problem is that called function has set ISA flag: -mavx512vbmi And that's also what clang says: clang pr82094.c -march=skylake-avx512 -mavx512f pr82094.c:16:11: error: always_inline function '_mm512_permutexvar_epi8' requires target feature 'avx512vbmi', but would be inlined into function 'main' that is compiled without support for 'avx512vbmi' c = _mm512_permutexvar_epi8(a, b); ^ Thus it's probably invalid.
[Bug sanitizer/81981] [8 Regression] -fsanitize=undefined makes a -Wmaybe-uninitialized warning disappear
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81981 --- Comment #4 from Jakub Jelinek --- Author: jakub Date: Mon Sep 4 08:11:44 2017 New Revision: 251641 URL: https://gcc.gnu.org/viewcvs?rev=251641&root=gcc&view=rev Log: PR sanitizer/81981 * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR and UBSAN_BOUNDS internal calls. Clean up IFN_UBSAN_OBJECT_SIZE handling. Use replace_call_with_value with NULL instead of gsi_replace, unlink_stmt_vdef and release_defs. * gcc.dg/ubsan/pr81981.c: New test. Added: trunk/gcc/testsuite/gcc.dg/ubsan/pr81981.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimple-fold.c trunk/gcc/testsuite/ChangeLog
[Bug target/82095] New: ICE in tree_nop_conversion at tree.c:11793 on ppc64le
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82095 Bug ID: 82095 Summary: ICE in tree_nop_conversion at tree.c:11793 on ppc64le Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux-gnu Target: ppc64le-linux-gnu Following test-case fails: $ cat pr.c void a () { static int b; static __thread int c; if (b) if (c) b = 1; } $ ppc64le-linux-gnu-gcc pr.c -c -fno-tree-ccp -Og pr.c:8:1: internal compiler error: Segmentation fault } ^ 0xb4e61f crash_signal .././../gcc/toplev.c:341 0xe1c291 tree_nop_conversion .././../gcc/tree.c:11793 0xe1c291 tree_strip_nop_conversions(tree_node*) .././../gcc/tree.c:11832 0xe1d6ca initializer_zerop(tree_node const*) .././../gcc/tree.c:10314 0xe61a0a categorize_decl_for_section(tree_node const*, int) .././../gcc/varasm.c:6566 0xe69c80 default_elf_select_section(tree_node*, int, unsigned long) .././../gcc/varasm.c:6615 0xe6ecc7 assemble_variable(tree_node*, int, int, int) .././../gcc/varasm.c:2269 0xe74791 varpool_node::assemble_decl() .././../gcc/varpool.c:590 0xe7546e varpool_node::assemble_decl() .././../gcc/varpool.c:758 0xe7546e symbol_table::output_variables() .././../gcc/varpool.c:756 0x7325be symbol_table::compile() .././../gcc/cgraphunit.c:2539 0x7352f6 symbol_table::compile() .././../gcc/cgraphunit.c:2634 0x7352f6 symbol_table::finalize_compilation_unit() .././../gcc/cgraphunit.c:2631
[Bug c++/82069] [8 Regression] ICE: Segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82069 Markus Trippelsdorf changed: What|Removed |Added Status|WAITING |NEW --- Comment #2 from Markus Trippelsdorf --- (In reply to Martin Liška from comment #1) > Can't reproduce Markus.. Strange. For me it segfaults both on X86_64 and ppc64le: ==6150== Command: /home/trippels/gcc_test/usr/local/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/cc1plus -fpreprocessed test.ii -quiet -dumpbase test.ii -mtune=generic -march=x86-64 -auxbase test -o /home/trippels/tmp/cc4LK1Ym.s ==6150== ==6150== Invalid read of size 8 ==6150==at 0x6BF81E: hash_table, tree_node*> >::hash_entry, xcallocator>::find_slot_with_hash(tree_node* const&, unsigned int, insert_option) (hash-table.h:878) ==6150==by 0x6BF9CC: hash_map, tree_node*> >::put(tree_node* const&, tree_node* const&) (hash-map.h:137) ==6150==by 0x80A102: register_local_specialization (pt.c:1906) ==6150==by 0x80A102: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:18153) ==6150==by 0x807A8B: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:17911) ==6150==by 0x80A181: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:17533) ==6150==by 0x808562: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:17070) ==6150==by 0x8098EC: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:17549) ==6150==by 0x6BCAF3: fold_non_dependent_expr(tree_node*) (constexpr.c:4936) ==6150==by 0x7F651F: build_non_dependent_expr(tree_node*) (pt.c:24955) ==6150==by 0x866207: finish_expr_stmt(tree_node*) (semantics.c:693) ==6150==by 0x7B4F11: cp_parser_expression_statement(cp_parser*, tree_node*) (parser.c:11127) ==6150==by 0x7C0E75: cp_parser_statement(cp_parser*, tree_node*, bool, bool*, vec*, unsigned int*) (parser.c:10887) ==6150== Address 0x8 is not stack'd, malloc'd or (recently) free'd ==6150== test.ii: In lambda function: test.ii:8:18: internal compiler error: Segmentation fault
[Bug target/82096] New: ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 Bug ID: 82096 Summary: ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux-gnu Target: arm-linux-gnueabi Following ICEs: $ arm-linux-gnueabi-gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c -Og -mflip-thumb -c /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c: In function ‘do_noret_di’: /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c:85:3: note: ‘__sync_fetch_and_nand’ changed semantics in GCC 4.4 __sync_fetch_and_nand (AL+15, 0xa0007ll); ^~~~ /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c:98:3: note: ‘__sync_nand_and_fetch’ changed semantics in GCC 4.4 __sync_nand_and_fetch (AL+23, 0xa0007ll); ^~~~ during RTL pass: expand /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c: In function ‘do_ret_di’: /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c:107:7: internal compiler error: in int_mode_for_mode, at stor-layout.c:403 if (__sync_bool_compare_and_swap (AL+1, 0x20003ll, 0x1234567890ll) != ^~ 0xb46b8a int_mode_for_mode(machine_mode) .././../gcc/stor-layout.c:403 0x80ae2e emit_move_via_integer .././../gcc/expr.c:3313 0x817d35 emit_move_insn_1(rtx_def*, rtx_def*) .././../gcc/expr.c:3693 0x81803e emit_move_insn(rtx_def*, rtx_def*) .././../gcc/expr.c:3761 0x7fa283 force_reg(machine_mode, rtx_def*) .././../gcc/explow.c:642 0xa57741 prepare_cmp_insn .././../gcc/optabs.c:3777 0xa57d21 emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*, machine_mode, int, rtx_def*, profile_probability) .././../gcc/optabs.c:4054 0x77f41f do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int, machine_mode, rtx_def*, rtx_code_label*, rtx_code_label*, profile_probability) .././../gcc/dojump.c:1151 0x806d95 emit_store_flag_force(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode, int, int) .././../gcc/expmed.c:6050 0xa59e16 expand_atomic_compare_and_swap(rtx_def**, rtx_def**, rtx_def*, rtx_def*, rtx_def*, bool, memmodel, memmodel) .././../gcc/optabs.c:6270 0x6cfa33 expand_builtin_compare_and_swap .././../gcc/builtins.c:5618 0x6dc791 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) .././../gcc/builtins.c:7203 0x8144cc expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) .././../gcc/expr.c:10874 0x81f8f7 expand_expr .././../gcc/expr.h:276 0x81f8f7 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool, tree_node*) .././../gcc/expr.c:5483 0x820d07 expand_assignment(tree_node*, tree_node*, bool) .././../gcc/expr.c:5343 0x6ffe7f expand_call_stmt .././../gcc/cfgexpand.c:2664 0x6ffe7f expand_gimple_stmt_1 .././../gcc/cfgexpand.c:3585 0x6ffe7f expand_gimple_stmt .././../gcc/cfgexpand.c:3751 0x701897 expand_gimple_basic_block .././../gcc/cfgexpand.c:5750
[Bug sanitizer/82076] inconsistencies between sanitizer and -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82076 Richard Biener changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener --- Warning / instrumenting on optimized IL is always going to run into these issues. And no, delaying optimization is not an option because earlier passes are relying on those optimizations.
[Bug fortran/82077] [7/8 Regression] ICE on associating polymorphic array dummy with a type-guarded array section
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82077 Richard Biener changed: What|Removed |Added Priority|P3 |P4 Target Milestone|--- |7.3
[Bug c++/82069] [8 Regression] ICE: Segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82069 --- Comment #3 from Martin Liška --- Now I can see it :)
[Bug c++/82084] [5/6/7/8 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Target Milestone|--- |5.5 --- Comment #2 from Richard Biener --- I'll have a look.
[Bug target/82094] error: inlining failed in call to always_inline ‘_mm512_permutexvar_epi8’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82094 Vinay Vasista changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #2 from Vinay Vasista --- Thanks, Martin! That solves my problem. It would have been more helpful if gcc gave me a possible cause for the failure, similar to what clang did. Because (arguably) nowhere was I able to figure out there is this "avx512vbmi" target feature required by the particular instruction I used. [ Just noting down the following point. I had also not added -O3 flag, which resulted in a few more errors: /tmp/ccpGIXuF.s: Assembler messages: /tmp/ccpGIXuF.s:17: Error: no such instruction: `vmovdqa64 -112(%rbp),%zmm0' /tmp/ccpGIXuF.s:18: Error: no such instruction: `vmovdqa64 %zmm0,-304(%rbp)' /tmp/ccpGIXuF.s:19: Error: no such instruction: `vmovdqa64 -176(%rbp),%zmm0' /tmp/ccpGIXuF.s:20: Error: no such instruction: `vmovdqa64 %zmm0,-368(%rbp)' /tmp/ccpGIXuF.s:21: Error: no such instruction: `vmovdqa64 -432(%rbp),%zmm0' /tmp/ccpGIXuF.s:22: Error: no such instruction: `vmovdqa64 %zmm0,%zmm2' /tmp/ccpGIXuF.s:23: Error: no such instruction: `vmovdqa64 -304(%rbp),%zmm0' /tmp/ccpGIXuF.s:24: Error: no such instruction: `vmovdqa64 -368(%rbp),%zmm1' /tmp/ccpGIXuF.s:26: Error: no such instruction: `kmovq %rax,%k1' /tmp/ccpGIXuF.s:27: Error: no such instruction: `vpermb %zmm1,%zmm0,%zmm2{%k1}' /tmp/ccpGIXuF.s:28: Error: no such instruction: `vmovdqa64 %zmm2,%zmm0' /tmp/ccpGIXuF.s:29: Error: no such instruction: `vmovdqa64 %zmm0,-240(%rbp)' After adding -O3 flag, the code got compiled without any error. ] Thanks again! ~ Vinay
[Bug c++/82085] [5/6/7/8 Regression] ICE: Template variable reference used in nested template alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82085 Richard Biener changed: What|Removed |Added Target Milestone|--- |5.5
[Bug target/82094] Improve diagnostics about target specific option mismatch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82094 Martin Liška changed: What|Removed |Added Status|RESOLVED|NEW Resolution|INVALID |--- Summary|error: inlining failed in |Improve diagnostics about |call to always_inline |target specific option |‘_mm512_permutexvar_epi8’ |mismatch Severity|normal |enhancement --- Comment #3 from Martin Liška --- Fully agree, let's have this PR opened for better diagnostics.
[Bug c++/43745] [avr] g++ puts VTABLES in SRAM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43745 --- Comment #14 from Matthijs Kooijman --- Thanks for the additional explanations!
[Bug tree-optimization/82090] Bogus warning: ‘magic_p’ may be used uninitialized in this function [-Wmaybe-uninitialized]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82090 Richard Biener changed: What|Removed |Added Keywords||missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed||2017-09-04 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- Confirmed (at -O1 even). We fail to jump-thread oldmem_5(D) == 0 and get [100.00%]: if (oldmem_5(D) == 0B) goto ; [4.07%] else goto ; [95.93%] [95.93%]: goto ; [100.00%] [4.07%]: [100.00%]: # magic_p_17 = PHI __asm__ __volatile__("cmpl $0, __libc_multiple_threads(%%rip) ... if (oldmem_5(D) == 0B) goto ; [0.04%] else goto ; [99.96%] [0.04%]: malloc_printerr ("realloc(): invalid pointer"); [99.96%]: _2 = *magic_p_17; _3 = ~_2; *magic_p_17 = _3; return oldmem_5(D); and the late uninit pass is not able to "prove" we're not using magic_p_18(D). Jump threading probably gives up because of the asm ().
[Bug ipa/82094] Improve diagnostics about target specific option mismatch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82094 Richard Biener changed: What|Removed |Added Keywords||diagnostic Target||x86_64-*-* Component|target |ipa --- Comment #4 from Richard Biener --- Probably requires the target hook to also return a diagnostic substring.
[Bug tree-optimization/82052] [8 Regression] ICE with "-O3 -m32" on x86_64-linux-gnu (internal compiler error: in pop_to_marker, at tree-ssa-scopedtables.c:71)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82052 --- Comment #6 from Tom de Vries --- Author: vries Date: Mon Sep 4 09:00:35 2017 New Revision: 251642 URL: https://gcc.gnu.org/viewcvs?rev=251642&root=gcc&view=rev Log: Fix call arguments mismatch in gcc.c-torture/compile/pr82052.c 2017-09-04 Tom de Vries PR tree-optimization/82052 * gcc.c-torture/compile/pr82052.c (fn2): Add parameters corresponding to call in fn11. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.c-torture/compile/pr82052.c
[Bug ipa/82094] Improve diagnostics about target specific option mismatch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82094 --- Comment #5 from Martin Liška --- (In reply to Richard Biener from comment #4) > Probably requires the target hook to also return a diagnostic substring. We have #define TARGET_OPTION_PRINT ix86_function_specific_print which is quite close what we would need.
[Bug c++/81942] ICE on empty constexpr constructor with C++14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81942 --- Comment #14 from Jakub Jelinek --- The patch LGTM, but I'll defer the final say to Jason/Nathan.
[Bug target/81693] FAIL: gcc.dg/torture/pr25967-*.c -O* execution test on darwin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81693 --- Comment #24 from Dominique d'Humieres --- > Does gcc.dg/torture/pr25967-2.c pass for both -m32 and -m64? Nope! % /opt/gcc/gcc8w/bin/gcc /opt/gcc/work/gcc/testsuite/gcc.dg/torture/pr25967-2.c -g % lldb ./a.out (lldb) target create "./a.out" Current executable set to './a.out' (x86_64). (lldb) run Process 26493 launched: './a.out' (x86_64) Process 26493 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x7fffbcb612fa libdyld.dylib`stack_not_16_byte_aligned_error libdyld.dylib`stack_not_16_byte_aligned_error: -> 0x7fffbcb612fa <+0>: movdqa %xmm0, (%rsp) 0x7fffbcb612ff <+5>: int3 libdyld.dylib`_dyld_func_lookup: 0x7fffbcb61300 <+0>: pushq %rbp 0x7fffbcb61301 <+1>: movq %rsp, %rbp (lldb) b main Breakpoint 1: where = a.out`main at pr25967-2.c:58, address = 0x00010f50 (lldb) disass -a 0x00010f50 a.out`main: 0x10f50 <+0>: andq $-0x10, %rsp 0x10f54 <+4>: pushq $0x12345675 ; imm = 0x12345675 0x10f59 <+9>: pushq $0x12345674 ; imm = 0x12345674 0x10f5e <+14>: pushq $0x12345673 ; imm = 0x12345673 0x10f63 <+19>: pushq $0x12345672 ; imm = 0x12345672 0x10f68 <+24>: pushq $0x12345671 ; imm = 0x12345671 0x10f6d <+29>: jmp0x10eef ; fn at pr25967-2.c:39 0x10f72 <+34>: movl $0x0, %eax 0x10f77 <+39>: retq Patched with --- ../_clean/gcc/testsuite/gcc.dg/torture/pr25967-2.c 2017-08-02 13:33:42.0 +0200 +++ gcc/testsuite/gcc.dg/torture/pr25967-2.c2017-09-04 11:54:55.0 +0200 @@ -16,6 +16,12 @@ typedef unsigned int uword_t __attribute #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) #define ASMNAME2(prefix, cname) XSTRING (prefix) cname +#if __LP64__ +# define STACK_POINTER "rsp" +#else +# define STACK_POINTER "esp" +#endif + struct interrupt_frame { uword_t ip; @@ -48,7 +54,9 @@ fn (void) int main () { - asm ("push $" STRING (SS) "; \ + /* Align interrupt handler stack to 16 bytes. */ + asm ("and$-16, %" STACK_POINTER "; \ +push $" STRING (SS) "; \ push$" STRING (SP) "; \ push$" STRING (FLAGS) ";\ push$" STRING (CS) "; \
[Bug target/82095] ICE in tree_nop_conversion at tree.c:11793 on ppc64le
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82095 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED CC||jakub at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Ever confirmed|0 |1
[Bug c++/82084] [5/6/7/8 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 --- Comment #3 from Richard Biener --- The STRING_CST isn't handled by native_encode_string which is why it fails: static int native_encode_string (const_tree expr, unsigned char *ptr, int len, int off) { tree type = TREE_TYPE (expr); HOST_WIDE_INT total_bytes; if (TREE_CODE (type) != ARRAY_TYPE || TREE_CODE (TREE_TYPE (type)) != INTEGER_TYPE || (GET_MODE_BITSIZE (SCALAR_INT_TYPE_MODE (TREE_TYPE (type))) != BITS_PER_UNIT) || !tree_fits_shwi_p (TYPE_SIZE_UNIT (type))) return 0; not sure why it only handles byte-sized literals, possibly endianess related. Going to handle those like fixed-point support (build a tree int and encode that...).
[Bug c++/82084] [5/6/7/8 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- (In reply to Richard Biener from comment #3) > The STRING_CST isn't handled by native_encode_string which is why it fails: > > static int > native_encode_string (const_tree expr, unsigned char *ptr, int len, int off) > { > tree type = TREE_TYPE (expr); > HOST_WIDE_INT total_bytes; > > if (TREE_CODE (type) != ARRAY_TYPE > || TREE_CODE (TREE_TYPE (type)) != INTEGER_TYPE > || (GET_MODE_BITSIZE (SCALAR_INT_TYPE_MODE (TREE_TYPE (type))) > != BITS_PER_UNIT) > || !tree_fits_shwi_p (TYPE_SIZE_UNIT (type))) > return 0; > > not sure why it only handles byte-sized literals, possibly endianess > related. > > Going to handle those like fixed-point support (build a tree int and > encode that...). I think the reason for not handling non-char strings is similar to why we don't have wide printf/scanf format string handling etc., that there are no agreed upon accessor for the elements of those strings. See https://gcc.gnu.org/ml/gcc-patches/2001-12/msg01579.html and PR38308 and PR20110. I think the vectorizer should verify if the constant can be successfully folded and punt if not, then whether we actually add support for the wchar_t/uchar16_t/uchar32_t strings or not can be independent of that.
[Bug c++/81942] ICE on empty constexpr constructor with C++14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81942 --- Comment #15 from Thomas Preud'homme --- (In reply to Jakub Jelinek from comment #14) > The patch LGTM, but I'll defer the final say to Jason/Nathan. FYI I tried the patch on arm-none-eabi toolchain and it fixes the bug reported. Best regards.
[Bug target/67458] x86: atomic store with memory_order_release doesn't order other stores
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67458 --- Comment #2 from Alexander Monakov --- Author: amonakov Date: Mon Sep 4 10:16:37 2017 New Revision: 251643 URL: https://gcc.gnu.org/viewcvs?rev=251643&root=gcc&view=rev Log: optabs: ensure atomic_load/stores have compiler barriers PR rtl-optimization/57448 PR target/67458 PR target/81316 * optabs.c (expand_atomic_load): Place compiler memory barriers if using atomic_load pattern. (expand_atomic_store): Likewise. testsuite/ * gcc.dg/atomic/pr80640-2.c: New testcase. * gcc.dg/atomic/pr81316.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/atomic/pr80640-2.c trunk/gcc/testsuite/gcc.dg/atomic/pr81316.c Modified: trunk/gcc/ChangeLog trunk/gcc/optabs.c trunk/gcc/testsuite/ChangeLog
[Bug target/81316] Missing memory side effect on __atomic_store
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81316 --- Comment #2 from Alexander Monakov --- Author: amonakov Date: Mon Sep 4 10:16:37 2017 New Revision: 251643 URL: https://gcc.gnu.org/viewcvs?rev=251643&root=gcc&view=rev Log: optabs: ensure atomic_load/stores have compiler barriers PR rtl-optimization/57448 PR target/67458 PR target/81316 * optabs.c (expand_atomic_load): Place compiler memory barriers if using atomic_load pattern. (expand_atomic_store): Likewise. testsuite/ * gcc.dg/atomic/pr80640-2.c: New testcase. * gcc.dg/atomic/pr81316.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/atomic/pr80640-2.c trunk/gcc/testsuite/gcc.dg/atomic/pr81316.c Modified: trunk/gcc/ChangeLog trunk/gcc/optabs.c trunk/gcc/testsuite/ChangeLog
[Bug rtl-optimization/57448] GCSE generates incorrect code with acquire barrier
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57448 --- Comment #3 from Alexander Monakov --- Author: amonakov Date: Mon Sep 4 10:16:37 2017 New Revision: 251643 URL: https://gcc.gnu.org/viewcvs?rev=251643&root=gcc&view=rev Log: optabs: ensure atomic_load/stores have compiler barriers PR rtl-optimization/57448 PR target/67458 PR target/81316 * optabs.c (expand_atomic_load): Place compiler memory barriers if using atomic_load pattern. (expand_atomic_store): Likewise. testsuite/ * gcc.dg/atomic/pr80640-2.c: New testcase. * gcc.dg/atomic/pr81316.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/atomic/pr80640-2.c trunk/gcc/testsuite/gcc.dg/atomic/pr81316.c Modified: trunk/gcc/ChangeLog trunk/gcc/optabs.c trunk/gcc/testsuite/ChangeLog
[Bug target/81316] Missing memory side effect on __atomic_store
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81316 Alexander Monakov changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Alexander Monakov --- Fixed.
[Bug target/67458] x86: atomic store with memory_order_release doesn't order other stores
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67458 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Comment #3 from Alexander Monakov --- Fixed, but note that the executable testcase in comment #1 has undefined behavior due to data race (unsynchronized write at line 11 and read at line 17).
[Bug target/67458] x86: atomic store with memory_order_release doesn't order other stores
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67458 Alexander Monakov changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Alexander Monakov --- .
[Bug rtl-optimization/57448] GCSE generates incorrect code with acquire barrier
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57448 Alexander Monakov changed: What|Removed |Added Status|ASSIGNED|RESOLVED CC||amonakov at gcc dot gnu.org Resolution|--- |FIXED --- Comment #4 from Alexander Monakov --- This should now be fixed on the trunk, although in a very different manner: RTL expansion of atomic loads/stores now places explicit compiler memory barriers in the form of asm volatile ("" ::: "memory") before/after the access as appropriate. My patch submission said, There's ALIAS_SET_MEMORY_BARRIER placed on MEMs accessed via atomics, but it's probably not useful, it's very hard to audit all RTL passes and ensure they respect it. On the other hand, asm barriers must work or else much of real-world code will break.
[Bug c++/82097] New: Invalid warning: declaration enum does not declare anything
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82097 Bug ID: 82097 Summary: Invalid warning: declaration enum does not declare anything Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: d.v.a at ngs dot ru Target Milestone: --- This code struct settings { enum class step { step1_clear, step2_copy }; step step; }; inline const char *to_text(enum settings::step v) { using step = enum settings::step; switch(v) { case step::step1_clear: return "STEP1"; case step::step2_copy: return "STEP2"; } } produces strange warning: warning: declaration 'enum class settings::step' does not declare anything using step = enum settings::step; ^~~~
[Bug middle-end/82095] ICE in tree_nop_conversion at tree.c:11793 on ppc64le
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82095 --- Comment #1 from Jakub Jelinek --- Created attachment 42112 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42112&action=edit gcc8-pr82095.patch Untested fix.
[Bug middle-end/82083] sanitizer detects signed integer overflow in tree-data-ref.c with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82083 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Isn't that the in the lambda_matrix* stuff? I've recently discussed it with Richard: do you know something about lambda_matrix_right_hermite and functions it calls? It calculates everything in int type, which on various testcases results in various signed integer overflows (both + and *) shall it just use HWIs, or wide_ints, something different instead? I "recently" changed similar code in tree-chrec.c to use widest_ints (tree_fold_binomial) I think the lambda code wants to use "infinite" precision integer math e.g. gcc.dg/torture/pr60183.c triggers many of these yeah, I spotted the lambda stuff as well but thought w/o a miscompile testcase I won't bother refactoring it (and making it slow) bumping lambda_vector from int * to int64_t * would help a bit but not really solve the underlying issue guess that would be some middle-ground, not have stuff really slow and large, and avoid miscompiling the large majority of what is miscompiled right now possibly No immediate plans to do anything about that though.
[Bug tree-optimization/82060] [7/8 Regression] ICE in refs_may_alias_p_1 with devirtualization enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82060 --- Comment #3 from Richard Biener --- Author: rguenth Date: Mon Sep 4 10:57:20 2017 New Revision: 251650 URL: https://gcc.gnu.org/viewcvs?rev=251650&root=gcc&view=rev Log: 2017-09-04 Richard Biener PR tree-optimization/82060 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Move devirtualization after stmt folding and before EH/AB/noreturn cleanup to get the stmt refs canonicalized. Use a bool instead of gimple_modified_p since that doesn't work for NOPs. Schedule NOPs generated by folding for removal. * g++.dg/torture/pr82060.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/torture/pr82060.C Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c
[Bug c++/82084] [5/6/7/8 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 --- Comment #5 from Richard Biener --- Created attachment 42113 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42113&action=edit patch for native_encode_string
[Bug c++/82084] [5/6/7/8 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 --- Comment #6 from Richard Biener --- Hmm, we could simply reject STRING_CSTs in vectorizable_store: Index: gcc/tree-vect-stmts.c === --- gcc/tree-vect-stmts.c (revision 251559) +++ gcc/tree-vect-stmts.c (working copy) @@ -5733,6 +5733,16 @@ vectorizable_store (gimple *stmt, gimple op = gimple_assign_rhs1 (stmt); + /* In the case this is a store from a STRING_CST make sure + native_encode_expr can handle it. */ + if (TREE_CODE (op) == STRING_CST + && (TREE_CODE (TREE_TYPE (op)) != ARRAY_TYPE + || TREE_CODE (TREE_TYPE (TREE_TYPE (op))) != INTEGER_TYPE + || (GET_MODE_BITSIZE + (SCALAR_INT_TYPE_MODE (TREE_TYPE (TREE_TYPE (op + != BITS_PER_UNIT))) +return false; + if (!vect_is_simple_use (op, vinfo, &def_stmt, &dt, &rhs_vectype)) { if (dump_enabled_p ()) probably best for branches.
[Bug sanitizer/82072] sanitizer does not detect an overflow from LLONG_MIN
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82072 --- Comment #11 from Marek Polacek --- Author: mpolacek Date: Mon Sep 4 11:30:26 2017 New Revision: 251651 URL: https://gcc.gnu.org/viewcvs?rev=251651&root=gcc&view=rev Log: PR sanitizer/82072 * convert.c (do_narrow): When sanitizing signed integer overflows, bail out for signed types. (convert_to_integer_1) : Likewise. * c-c++-common/ubsan/pr82072.c: New test. Added: trunk/gcc/testsuite/c-c++-common/ubsan/pr82072.c Modified: trunk/gcc/ChangeLog trunk/gcc/convert.c trunk/gcc/testsuite/ChangeLog
[Bug libstdc++/81338] stringstream remains empty after being moved into multiple times
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81338 --- Comment #3 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 12:24:33 2017 New Revision: 251652 URL: https://gcc.gnu.org/viewcvs?rev=251652&root=gcc&view=rev Log: PR libstdc++/81338 correctly manage string capacity Backport from mainline 2017-07-10 Jonathan Wakely PR libstdc++/81338 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string): Declare basic_stringbuf to be a friend. * include/bits/sstream.tcc (basic_stringbuf::overflow) [_GLIBCXX_USE_CXX11_ABI]: Use unused capacity before reallocating. * include/std/sstream (basic_stringbuf::__xfer_bufptrs): Update string length to buffer length. * testsuite/27_io/basic_stringstream/assign/81338.cc: New. Added: branches/gcc-7-branch/libstdc++-v3/testsuite/27_io/basic_stringstream/assign/81338.cc Modified: branches/gcc-7-branch/libstdc++-v3/ChangeLog branches/gcc-7-branch/libstdc++-v3/include/bits/basic_string.h branches/gcc-7-branch/libstdc++-v3/include/bits/sstream.tcc branches/gcc-7-branch/libstdc++-v3/include/std/sstream
[Bug libstdc++/81599] Error in documentation of std::stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81599 --- Comment #4 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 12:24:37 2017 New Revision: 251653 URL: https://gcc.gnu.org/viewcvs?rev=251653&root=gcc&view=rev Log: PR libstdc++/81599 fix typo in Doxygen comments Backport from mainline 2017-07-31 Marek Polacek PR libstdc++/81599 * include/bits/stl_stack.h: Fix typo. Modified: branches/gcc-7-branch/libstdc++-v3/ChangeLog branches/gcc-7-branch/libstdc++-v3/include/bits/stl_stack.h
[Bug c++/82039] -Wzero-as-null-pointer-constant triggers when calling std::allocate<...>::allocate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82039 --- Comment #5 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 12:24:57 2017 New Revision: 251658 URL: https://gcc.gnu.org/viewcvs?rev=251658&root=gcc&view=rev Log: PR c++/82039 suppress -Wzero-as-null-pointer-constant warning Backport from mainline 2017-08-31 Jonathan Wakely PR c++/82039 * include/ext/new_allocator.h (__gnu_cxx::new_allocator::allocate): Adjust null pointer constant to avoid warning. Modified: branches/gcc-7-branch/libstdc++-v3/ChangeLog branches/gcc-7-branch/libstdc++-v3/include/ext/new_allocator.h
[Bug libstdc++/81891] [5/6/7 Regression] heap-use-after-free if inserting element in std::unordered_map(InputIt, InputIt) throws
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81891 --- Comment #6 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 12:24:42 2017 New Revision: 251654 URL: https://gcc.gnu.org/viewcvs?rev=251654&root=gcc&view=rev Log: PR libstdc++/81891 fix double-free in hashtable constructor Backport from mainline 2017-08-18 Jonathan Wakely PR libstdc++/81891 * include/bits/hashtable.h (_Hashtable(_InputIterator, _InputIterator, size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&)): Let destructor do clean up if an exception is thrown. * testsuite/23_containers/unordered_map/cons/81891.cc: New. Added: branches/gcc-7-branch/libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc Modified: branches/gcc-7-branch/libstdc++-v3/ChangeLog branches/gcc-7-branch/libstdc++-v3/include/bits/hashtable.h
[Bug libstdc++/81912] std::distance not constexpr in C++17 mode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81912 --- Comment #4 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 12:24:53 2017 New Revision: 251657 URL: https://gcc.gnu.org/viewcvs?rev=251657&root=gcc&view=rev Log: PR libstdc++/81912 make std::__iterator_category constexpr Backport from mainline 2017-08-21 Jonathan Wakely PR libstdc++/81912 * include/bits/stl_iterator_base_types.h (__iterator_category): Add constexpr for C++11 and later. * testsuite/24_iterators/container_access.cc: Add target selector. * testsuite/24_iterators/range_access.cc: Fix clause number in comment. * testsuite/24_iterators/range_access_cpp14.cc: Likewise. * testsuite/24_iterators/range_access_cpp17.cc: New. Added: branches/gcc-7-branch/libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc Modified: branches/gcc-7-branch/libstdc++-v3/ChangeLog branches/gcc-7-branch/libstdc++-v3/include/bits/stl_iterator_base_types.h branches/gcc-7-branch/libstdc++-v3/testsuite/24_iterators/container_access.cc branches/gcc-7-branch/libstdc++-v3/testsuite/24_iterators/range_access.cc branches/gcc-7-branch/libstdc++-v3/testsuite/24_iterators/range_access_cpp14.cc
[Bug fortran/82064] [7/8 Regression] [OOP] multiple incompatible definitions of extended derived type via module use
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82064 Jakub Jelinek changed: What|Removed |Added Priority|P3 |P4 CC||jakub at gcc dot gnu.org
[Bug target/82012] [8 Regression] libitm build fails for s390x-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82012 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #10 from Jakub Jelinek --- So fixed? Doesn't this exist also on 7.x branch (I believe Richard has backported his changes there)?
[Bug target/82012] [8 Regression] libitm build fails for s390x-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82012 --- Comment #11 from rguenther at suse dot de --- On Mon, 4 Sep 2017, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82012 > > Jakub Jelinek changed: > >What|Removed |Added > > CC||jakub at gcc dot gnu.org > > --- Comment #10 from Jakub Jelinek --- > So fixed? Doesn't this exist also on 7.x branch (I believe Richard has > backported his changes there)? I only backported the extra optimization on x86 -mfpmath, not the targethook default implementation change.
[Bug sanitizer/82072] sanitizer does not detect an overflow from LLONG_MIN
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82072 --- Comment #12 from Marek Polacek --- (In reply to Vittorio Zecca from comment #10) > A related issue is the following: > > /* UB sanitizer should detect undefined negation of LLONG_MIN */ > /* must be compiled with -fsanitize=undefined and run */ > #include > int main() > { > long long int llnum=LLONG_MIN; > unsigned int unum; > unum = - llnum;/*negation of -9223372036854775808 cannot be represented in > type 'long long int'*/ > return 0; > } > > Or should I open a new bug? This is related. Due to case NEGATE_EXPR: in convert_to_integer_1: 913 return convert (type, 914 fold_build1 (ex_form, typex, 915convert (typex, 916 TREE_OPERAND (expr, 0; instead of unum = (unsigned int) -llnum; we create unum = -(unsigned int) llnum; hiding the overflow.
[Bug target/82002] [8 Regression] ICE in sp_valid_at, at config/i386/i386.c:13233
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82002 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- (In reply to Daniel Santos from comment #2) > Another problem when we throw in an ms to sysv call: > /home/daniel/proj/sys/gcc/git/gcc/testsuite/gcc.target/i386/pr82002-2a.c: In > function 'b': > /home/daniel/proj/sys/gcc/git/gcc/testsuite/gcc.target/i386/pr82002-2a.c:12: > 1: error: unrecognizable insn: > (insn/f 36 35 37 2 (set (mem/c:V4SF (plus:DI (reg/f:DI 7 sp) > (const_int 116 [0x2540be410])) [2 S16 A128]) > (reg:V4SF 27 xmm6)) > "/home/daniel/proj/sys/gcc/git/gcc/testsuite/gcc.target/i386/pr82002-2a.c":7 > -1 > (expr_list:REG_DEAD (reg:V4SF 27 xmm6) > (expr_list:REG_CFA_EXPRESSION (set (mem/c:V4SF (plus:DI (reg/f:DI 7 > sp) > (const_int 116 [0x2540be410])) [2 S16 A128]) > (reg:V4SF 27 xmm6)) > (nil > during RTL pass: cprop_hardreg > /home/daniel/proj/sys/gcc/git/gcc/testsuite/gcc.target/i386/pr82002-2a.c:12: > 1: internal compiler error: in extract_insn, at recog.c:2306 > 0x5c1958 _fatal_insn(char const*, rtx_def const*, char const*, int, char > const*) > /home/daniel/proj/sys/gcc/git/gcc/rtl-error.c:108 > 0x5c1974 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) > /home/daniel/proj/sys/gcc/git/gcc/rtl-error.c:116 > 0xba05a9 extract_insn(rtx_insn*) > /home/daniel/proj/sys/gcc/git/gcc/recog.c:2306 > 0xba15e8 extract_constrain_insn(rtx_insn*) > /home/daniel/proj/sys/gcc/git/gcc/recog.c:2206 > 0xbaaaf6 copyprop_hardreg_forward_1 > /home/daniel/proj/sys/gcc/git/gcc/regcprop.c:801 > 0xbab8a4 execute > /home/daniel/proj/sys/gcc/git/gcc/regcprop.c:1308 > > > I guess we don't have a 64-bit offset instruction for (v)movabs :) Of course there is none. Which is why e.g. pro_epilogue_adjust_stack has code to handle the case when Pmode is not SImode and offset is not x86_64_immediate_operand. So whatever generated this insn also needs to test for sp + offset not being a valid address and load the offset into some hard register first and use sp + that_reg. pro_and_epilogue pass is after reload, so we can't wait for RA to handle it for us.
[Bug target/82098] New: [8 regression] internal compiler error: in elimination_costs_in_insn, at reload1.c:3616, -march=i686
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82098 Bug ID: 82098 Summary: [8 regression] internal compiler error: in elimination_costs_in_insn, at reload1.c:3616, -march=i686 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: arnd at linaro dot org Target Milestone: --- Created attachment 42114 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42114&action=edit linux/drivers/gpio/gpio-bcm-kona.c, preprocessed and compressed Building the Linux kernel with today's r251641 snapshoy, I encountered several internal compiler errors in gpio device drivers, all on x86, and all with the same call chain: $ x86_64-linux-gcc-8.0.0 -m32 -march=i686 -O2 -c gpio-bcm-kona.i /git/arm-soc/drivers/gpio/gpio-bcm-kona.c: In function 'bcm_kona_gpio_irq_ack': /git/arm-soc/drivers/gpio/gpio-bcm-kona.c:357:1: internal compiler error: in elimination_costs_in_insn, at reload1.c:3616 } ^ 0xa484cb elimination_costs_in_insn /home/arnd/git/gcc/gcc/reload1.c:3613 0xa48f3f calculate_elim_costs_all_insns() /home/arnd/git/gcc/gcc/reload1.c:1607 0x9299cf ira_costs() /home/arnd/git/gcc/gcc/ira-costs.c:2255 0x923152 ira_build() /home/arnd/git/gcc/gcc/ira-build.c:3420 0x91ad5c ira /home/arnd/git/gcc/gcc/ira.c:5270 0x91ad5c execute /home/arnd/git/gcc/gcc/ira.c:5581 I have attached the preprocessed source file, but have not yet created a reduced test case. The previous snapshot I used was r251220, dated Aug 21, and did not produce this ICE.
[Bug sanitizer/82072] sanitizer does not detect an overflow from LLONG_MIN
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82072 --- Comment #13 from Marek Polacek --- So maybe --- a/gcc/convert.c +++ b/gcc/convert.c @@ -886,6 +886,10 @@ convert_to_integer_1 (tree type, tree expr, bool dofold) break; case NEGATE_EXPR: + /* Using unsigned arithmetic may hide overflow bugs. */ + if (sanitize_flags_p (SANITIZE_SI_OVERFLOW)) + break; + /* Falls through. */ case BIT_NOT_EXPR: /* This is not correct for ABS_EXPR, since we must test the sign before truncation. */ @@ -902,12 +906,7 @@ convert_to_integer_1 (tree type, tree expr, bool dofold) TYPE_UNSIGNED (typex)); if (!TYPE_UNSIGNED (typex)) - { - /* Using unsigned arithmetic may hide overflow bugs. */ - if (sanitize_flags_p (SANITIZE_SI_OVERFLOW)) - break; - typex = unsigned_type_for (typex); - } + typex = unsigned_type_for (typex); return convert (type, fold_build1 (ex_form, typex, convert (typex,
[Bug sanitizer/81981] [8 Regression] -fsanitize=undefined makes a -Wmaybe-uninitialized warning disappear
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81981 --- Comment #5 from Jakub Jelinek --- Fixed.
[Bug sanitizer/82072] sanitizer does not detect an overflow from LLONG_MIN
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82072 --- Comment #14 from Jakub Jelinek --- (In reply to Marek Polacek from comment #13) > So maybe > > --- a/gcc/convert.c > +++ b/gcc/convert.c > @@ -886,6 +886,10 @@ convert_to_integer_1 (tree type, tree expr, bool dofold) > break; > > case NEGATE_EXPR: > + /* Using unsigned arithmetic may hide overflow bugs. */ > + if (sanitize_flags_p (SANITIZE_SI_OVERFLOW)) > + break; > + /* Falls through. */ > case BIT_NOT_EXPR: > /* This is not correct for ABS_EXPR, >since we must test the sign before truncation. */ > @@ -902,12 +906,7 @@ convert_to_integer_1 (tree type, tree expr, bool dofold) > TYPE_UNSIGNED (typex)); > > if (!TYPE_UNSIGNED (typex)) > - { > - /* Using unsigned arithmetic may hide overflow bugs. */ > - if (sanitize_flags_p (SANITIZE_SI_OVERFLOW)) > - break; > - typex = unsigned_type_for (typex); > - } > + typex = unsigned_type_for (typex); > return convert (type, > fold_build1 (ex_form, typex, >convert (typex, Without checking if the inner type is signed? That would unnecessarily penalize code where we have say: unsigned long long l; unsigned int i = -l; or similar, no?
[Bug sanitizer/82072] sanitizer does not detect an overflow from LLONG_MIN
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82072 --- Comment #15 from Marek Polacek --- I'm not sure if it even makes a difference, but I've added the check.
[Bug tree-optimization/82060] [7 Regression] ICE in refs_may_alias_p_1 with devirtualization enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82060 Richard Biener changed: What|Removed |Added Known to work||8.0 Summary|[7/8 Regression] ICE in |[7 Regression] ICE in |refs_may_alias_p_1 with |refs_may_alias_p_1 with |devirtualization enabled|devirtualization enabled Known to fail|8.0 | --- Comment #4 from Richard Biener --- Fixed on trunk sofar.
[Bug libstdc++/81912] std::distance not constexpr in C++17 mode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81912 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Jonathan Wakely --- Fixed for 7.3
[Bug target/82098] [8 regression] internal compiler error: in elimination_costs_in_insn, at reload1.c:3616, -march=i686
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82098 Richard Biener changed: What|Removed |Added Target Milestone|--- |8.0
[Bug tree-optimization/64910] tree reassociation results in poor code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64910 Jeffrey A. Law changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Jeffrey A. Law --- Fixed on the trunk.
[Bug tree-optimization/64910] tree reassociation results in poor code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64910 --- Comment #3 from Jeffrey A. Law --- Author: law Date: Mon Sep 4 14:00:29 2017 New Revision: 251659 URL: https://gcc.gnu.org/viewcvs?rev=251659&root=gcc&view=rev Log: 2017-09-03 Jeff Law PR tree-optimization/64910 * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops, swap the first and last operand if the last is a constant. PR tree-optimization/64910 * gcc.dg/tree-ssa/pr64910-2.c: New test. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/pr64910-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-reassoc.c
[Bug c/81783] -Wtautological-compare could do better
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81783 --- Comment #4 from Marek Polacek --- Author: mpolacek Date: Mon Sep 4 14:05:01 2017 New Revision: 251660 URL: https://gcc.gnu.org/viewcvs?rev=251660&root=gcc&view=rev Log: PR c/81783 * c-warn.c (warn_tautological_bitwise_comparison): New function. (warn_tautological_cmp): Call it. * doc/invoke.texi: Update -Wtautological-compare documentation. * c-c++-common/Wtautological-compare-5.c: New test. Added: trunk/gcc/testsuite/c-c++-common/Wtautological-compare-5.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-warn.c trunk/gcc/doc/invoke.texi trunk/gcc/testsuite/ChangeLog
[Bug c/81783] -Wtautological-compare could do better
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81783 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Marek Polacek --- Done for GCC 8.
[Bug c++/82084] [5/6/7/8 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 --- Comment #7 from Richard Biener --- Author: rguenth Date: Mon Sep 4 14:10:11 2017 New Revision: 251661 URL: https://gcc.gnu.org/viewcvs?rev=251661&root=gcc&view=rev Log: 2017-09-04 Richard Biener PR tree-optimization/82084 * fold-const.h (can_native_encode_string_p): Declare. * fold-const.c (can_native_encode_string_p): Factor out from ... (native_encode_string): ... here. * tree-vect-stmts.c (vectorizable_store): Call it to avoid vectorizing stores from constants we later cannot handle. * g++.dg/torture/pr82084.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/torture/pr82084.C Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/fold-const.h trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-stmts.c
[Bug c++/82084] [5/6/7 Regression] ICE: constructing wstring with -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82084 Richard Biener changed: What|Removed |Added Known to work||8.0 Summary|[5/6/7/8 Regression] ICE: |[5/6/7 Regression] ICE: |constructing wstring with |constructing wstring with |-O3 |-O3 Known to fail||7.2.0 --- Comment #8 from Richard Biener --- Fixed on trunk sofar.
[Bug other/81979] [8 Regression] Assembler messages: Error: can't resolve `.got2' {.got2 section} - `.LCF0' {.text.unlikely section}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81979 Jakub Jelinek changed: What|Removed |Added Target|powerpcspe-*-linux-gnu* |powerpc-*-linux-gnu*, ||powerpcspe-*-linux-gnu* CC||jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- It fails even on powerpc64-linux-gnu with -m32 -fPIC -O2 -freorder-blocks-and-partition, so no, it hasn't been fixed. The problem is that the .LCLn and .LCFn labels have to be emitted in the same section; the .LCLn label is emitted in the .text section by rs6000_elf_declare_function_name (or is it generally in the section in which the function starts?), but the corresponding .LCFn label is emitted by the load_toc_v4_PIC_1_normal instruction. So, I'd say uses_TOC should return 2 instead of 1 if while looking for UNSPEC_TOC instruction it crossed a NOTE_INSN_SWITCH_TEXT_SECTIONS and the caller should deal with that. Let me try that.
[Bug target/81979] [8 Regression] Assembler messages: Error: can't resolve `.got2' {.got2 section} - `.LCF0' {.text.unlikely section}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81979 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-09-04 Component|other |target Ever confirmed|0 |1
[Bug target/81979] [8 Regression] Assembler messages: Error: can't resolve `.got2' {.got2 section} - `.LCF0' {.text.unlikely section}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81979 --- Comment #3 from Jakub Jelinek --- Created attachment 42115 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42115&action=edit gcc8-pr81979.patch Untested fix.
[Bug c++/81933] [7/8 Regression] Invalid "constexpr call flows off the end of the function" error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81933 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-09-04 CC||jakub at gcc dot gnu.org, ||jason at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek --- Started with r239267.
[Bug tree-optimization/81913] [8 Regression] wrong code at -O1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81913 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek --- So fixed?
[Bug target/77308] surprisingly large stack usage for sha512 on arm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77308 --- Comment #64 from Bernd Edlinger --- Author: edlinger Date: Mon Sep 4 15:25:59 2017 New Revision: 251663 URL: https://gcc.gnu.org/viewcvs?rev=251663&root=gcc&view=rev Log: 2017-09-04 Bernd Edlinger PR target/77308 * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for TARGET_NEON and TARGET_IWMMXT. (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for TARGET_NEON and TARGET_IWMMXT. (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here. testsuite: 2017-09-04 Bernd Edlinger PR target/77308 * gcc.target/arm/pr77308-1.c: New test. Added: trunk/gcc/testsuite/gcc.target/arm/pr77308-1.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.md trunk/gcc/testsuite/ChangeLog
[Bug c++/82099] New: internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82099 Bug ID: 82099 Summary: internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc at hazardy dot de Target Milestone: --- Created attachment 42116 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42116&action=edit The test file. Trying to use a function pointer as predicate, e.g. in std::equal results in the following error: $ g++ test.cpp -std=c++1z -save-temps -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=E:/MinGW64/bin/../libexec/gcc/x86_64-w64-mingw32/7.1.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-7.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev2, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-static/include -I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-static/include -I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-static/include -I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/lib -L/c/mingw710/prerequisites/x86_64-zlib-static/lib -L/c/mingw710/prerequisites/x86_64-w64-mingw32-static/lib ' Thread model: posix gcc version 7.1.0 (x86_64-posix-seh-rev2, Built by MinGW-W64 project) COLLECT_GCC_OPTIONS='-std=c++1z' '-save-temps' '-v' '-shared-libgcc' '-mtune=core2' '-march=nocona' E:/MinGW64/bin/../libexec/gcc/x86_64-w64-mingw32/7.1.0/cc1plus.exe -E -quiet -v -iprefix E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/ -D_REENTRANT test.cpp -mtune=core2 -march=nocona -std=c++1z -fpch-preprocess -o test.ii ignoring duplicate directory "E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++" ignoring duplicate directory "E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/x86_64-w64-mingw32" ignoring duplicate directory "E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/backward" ignoring duplicate directory "E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include" ignoring nonexistent directory "C:/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../include" ignoring duplicate directory "E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include-fixed" ignoring duplicate directory "E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/include" ignoring nonexistent directory "C:/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/mingw/include" #include "..." search starts here: #include <...> search starts here: E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++ E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/x86_64-w64-mingw32 E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/backward E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include-fixed E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/include End of search list. COLLECT_GCC_OPTIONS='-std=c++1z' '-save-temps' '-v' '-shared-libgcc' '-mtune=core2' '-march=nocona' E:/MinGW64/bin/../libexec/gcc/x86_64-w64-mingw32/7.1.0/cc1plus.exe -fpreprocessed t
[Bug c++/82099] internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82099 --- Comment #1 from Björn Schäpers --- Created attachment 42117 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42117&action=edit The preprocessed test file.
[Bug middle-end/82004] [8 Regression] SPEC CPU2017 628.pop2_s miscompare
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82004 --- Comment #4 from Andrey Guskov --- Okay, finally I`ve got a minimal reproducer. All this miscompare boils down to the following: program r628 real(8) :: l = -3 print *, merge("PASSED", "FAILED", 1D-3 .le. 10**l) end program r628 Normally, 10^-3 should equal 10^-3, but not after the optimization in question. $ gfortran -m64 -O3 -o r628 r628.f90 && ./r628 PASSED $ gfortran -m64 -Ofast -o r628 r628.f90 && ./r628 FAILED
[Bug target/82098] [8 regression] internal compiler error: in elimination_costs_in_insn, at reload1.c:3616, -march=i686
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82098 Uroš Bizjak changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-09-04 Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail dot com Ever confirmed|0 |1 --- Comment #1 from Uroš Bizjak --- Oops ... patch in testing. --cut here-- Index: i386.md === --- i386.md (revision 251662) +++ i386.md (working copy) @@ -11033,8 +11033,9 @@ (match_operand:SI 2 "const_int_operand")) 0)) (match_operand:SWI48 3 "register_operand"))) (clobber (reg:CC FLAGS_REG))] - "(INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) - == GET_MODE_BITSIZE (mode)-1 + "TARGET_USE_BT + && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) + == GET_MODE_BITSIZE (mode)-1 && can_create_pseudo_p ()" "#" "&& 1" @@ -11073,8 +11074,9 @@ (match_operand:SI 2 "const_int_operand")) 0)) (match_operand:SWI48 3 "register_operand"))) (clobber (reg:CC FLAGS_REG))] - "(INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) - == GET_MODE_BITSIZE (mode)-1 + "TARGET_USE_BT + && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) + == GET_MODE_BITSIZE (mode)-1 && can_create_pseudo_p ()" "#" "&& 1" --cut here--
[Bug middle-end/82004] [8 Regression] SPEC CPU2017 628.pop2_s miscompare
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82004 --- Comment #5 from Andrey Guskov --- This is the actual guilty line: sw_absorption.F90:chlamnt = 10**(logchl) It computes 'chlamnt' and then compares it to the list of acceptable values. When -Ofast is enabled, CPU2017::628 considers 'chlamnt' unacceptable.
[Bug libstdc++/79162] [7/8 Regression] [C++17] ambiguity in string assignment due to string_view overload
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79162 --- Comment #17 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 15:48:47 2017 New Revision: 251664 URL: https://gcc.gnu.org/viewcvs?rev=251664&root=gcc&view=rev Log: PR libstdc++/79162 implement LWG 2946 and LWG 2758 2017-09-04 Daniel Kruegler PR libstdc++/79162 Implement LWG 2946, LWG 2758's resolution missed further corrections * include/bits/basic_string.h (basic_string::compare): Add missing required noexcept specifications. (basic_string): Introduce internal _S_to_string_view and __sv_wrapper for implicit string_view conversion. (basic_string::basic_string): Fix explicit string_view conversion by implicit conversion using _S_to_string_view and __sv_wrapper. (basic_string): Introduce internal basic_string(__sv_wrapper, Alloc) constructor. (basic_string): Fix operator=(T) template by operator=(const T&) template for uncopyable types (PR 79162). (basic_string::operator+=, basic_string::append, basic_string::assign) (basic_string::insert, basic_string::replace, basic_string::find) (basic_string::rfind, basic_string::find_first_of) (basic_string::find_last_of, basic_string::find_first_not_of) (basic_string::find_last_not_of, basic_string::compare): Replace __sv_type argument by template const T& (LWG 2946) and correct documentation describing __sv_type argument. (basic_string::find, basic_string::rfind, basic_string::find_first_of) (basic_string::find_last_of, basic_string::find_first_not_of) (basic_string::find_last_not_of, basic_string::compare): Replace unconditional noexcept specification by conditional noexcept specification to partially balance the removal of noexcept by LWG 2946. * testsuite/21_strings/basic_string/79162.cc: New. * testsuite/21_strings/basic_string/lwg2946.cc: New. Added: trunk/libstdc++-v3/testsuite/21_strings/basic_string/79162.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/lwg2946.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/basic_string.h
[Bug tree-optimization/58454] Potentially wrong(or at least weird/inconsistent) code generation with -O2 -fno-strict-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58454 Manuel López-Ibáñez changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment #6 from Manuel López-Ibáñez --- Richard, is this bug fixed for GCC 8? I'd like to update the FAQ: https://gcc.gnu.org/wiki/FAQ#signed_overflow
[Bug libstdc++/81338] stringstream remains empty after being moved into multiple times
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81338 --- Comment #4 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:16:58 2017 New Revision: 251665 URL: https://gcc.gnu.org/viewcvs?rev=251665&root=gcc&view=rev Log: PR libstdc++/81338 correctly manage string capacity Backport from mainline 2017-07-10 Jonathan Wakely PR libstdc++/81338 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string): Declare basic_stringbuf to be a friend. * include/bits/sstream.tcc (basic_stringbuf::overflow) [_GLIBCXX_USE_CXX11_ABI]: Use unused capacity before reallocating. * include/std/sstream (basic_stringbuf::__xfer_bufptrs): Update string length to buffer length. * testsuite/27_io/basic_stringstream/assign/81338.cc: New. Added: branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_stringstream/assign/81338.cc Modified: branches/gcc-6-branch/libstdc++-v3/ChangeLog branches/gcc-6-branch/libstdc++-v3/include/bits/basic_string.h branches/gcc-6-branch/libstdc++-v3/include/bits/sstream.tcc branches/gcc-6-branch/libstdc++-v3/include/std/sstream
[Bug c++/82039] -Wzero-as-null-pointer-constant triggers when calling std::allocate<...>::allocate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82039 --- Comment #6 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:17:11 2017 New Revision: 251668 URL: https://gcc.gnu.org/viewcvs?rev=251668&root=gcc&view=rev Log: PR c++/82039 suppress -Wzero-as-null-pointer-constant warning Backport from mainline 2017-08-31 Jonathan Wakely PR c++/82039 * include/ext/new_allocator.h (__gnu_cxx::new_allocator::allocate): Adjust null pointer constant to avoid warning. Modified: branches/gcc-6-branch/libstdc++-v3/ChangeLog branches/gcc-6-branch/libstdc++-v3/include/ext/new_allocator.h
[Bug libstdc++/81599] Error in documentation of std::stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81599 --- Comment #5 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:17:03 2017 New Revision: 251666 URL: https://gcc.gnu.org/viewcvs?rev=251666&root=gcc&view=rev Log: PR libstdc++/81599 fix typo in Doxygen comments Backport from mainline 2017-07-31 Marek Polacek PR libstdc++/81599 * include/bits/stl_stack.h: Fix typo. Modified: branches/gcc-6-branch/libstdc++-v3/ChangeLog branches/gcc-6-branch/libstdc++-v3/include/bits/stl_stack.h
[Bug libstdc++/81891] [5/6/7 Regression] heap-use-after-free if inserting element in std::unordered_map(InputIt, InputIt) throws
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81891 --- Comment #7 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:17:07 2017 New Revision: 251667 URL: https://gcc.gnu.org/viewcvs?rev=251667&root=gcc&view=rev Log: PR libstdc++/81891 fix double-free in hashtable constructor Backport from mainline 2017-08-18 Jonathan Wakely PR libstdc++/81891 * include/bits/hashtable.h (_Hashtable(_InputIterator, _InputIterator, size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&)): Let destructor do clean up if an exception is thrown. * testsuite/23_containers/unordered_map/cons/81891.cc: New. Added: branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc Modified: branches/gcc-6-branch/libstdc++-v3/ChangeLog branches/gcc-6-branch/libstdc++-v3/include/bits/hashtable.h
[Bug target/81988] [7/8 regression] invalid std instruction with odd register
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81988 --- Comment #6 from Eric Botcazou --- > I've attached a reduced testcase which fails on GCC 7 and 8 with the same > kind of error. This issue is an STD instruction which tries to store an odd > numbered register which is not allowed: Can you also attach the original, preprocessed testcase?
[Bug c++/82099] internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82099 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-09-04 CC||jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Jakub Jelinek --- Reduced testcase (fails with all of -std=c++{11,14,17}, just the ICE is different with c++17): template void bar (T x, U u) { u (x); } template void baz (T t) noexcept (noexcept (t)); void foo (int x) { bar (x, baz); }
[Bug c++/82099] internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82099 Jakub Jelinek changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- Started to ICE with r160298 or so (when noexcept has been implemented).
[Bug libstdc++/81338] stringstream remains empty after being moved into multiple times
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81338 --- Comment #5 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:41:25 2017 New Revision: 251669 URL: https://gcc.gnu.org/viewcvs?rev=251669&root=gcc&view=rev Log: PR libstdc++/81338 correctly manage string capacity Backport from mainline 2017-07-10 Jonathan Wakely PR libstdc++/81338 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string): Declare basic_stringbuf to be a friend. * include/bits/sstream.tcc (basic_stringbuf::overflow) [_GLIBCXX_USE_CXX11_ABI]: Use unused capacity before reallocating. * include/std/sstream (basic_stringbuf::__xfer_bufptrs): Update string length to buffer length. * testsuite/27_io/basic_stringstream/assign/81338.cc: New. Added: branches/gcc-5-branch/libstdc++-v3/testsuite/27_io/basic_stringstream/assign/81338.cc Modified: branches/gcc-5-branch/libstdc++-v3/ChangeLog branches/gcc-5-branch/libstdc++-v3/include/bits/basic_string.h branches/gcc-5-branch/libstdc++-v3/include/bits/sstream.tcc branches/gcc-5-branch/libstdc++-v3/include/std/sstream
[Bug libstdc++/81891] [5/6/7 Regression] heap-use-after-free if inserting element in std::unordered_map(InputIt, InputIt) throws
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81891 --- Comment #8 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:41:34 2017 New Revision: 251671 URL: https://gcc.gnu.org/viewcvs?rev=251671&root=gcc&view=rev Log: PR libstdc++/81891 fix double-free in hashtable constructor Backport from mainline 2017-08-18 Jonathan Wakely PR libstdc++/81891 * include/bits/hashtable.h (_Hashtable(_InputIterator, _InputIterator, size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&)): Let destructor do clean up if an exception is thrown. * testsuite/23_containers/unordered_map/cons/81891.cc: New. Added: branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc Modified: branches/gcc-5-branch/libstdc++-v3/ChangeLog branches/gcc-5-branch/libstdc++-v3/include/bits/hashtable.h
[Bug libstdc++/81599] Error in documentation of std::stack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81599 --- Comment #6 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:41:29 2017 New Revision: 251670 URL: https://gcc.gnu.org/viewcvs?rev=251670&root=gcc&view=rev Log: PR libstdc++/81599 fix typo in Doxygen comments Backport from mainline 2017-07-31 Marek Polacek PR libstdc++/81599 * include/bits/stl_stack.h: Fix typo. Modified: branches/gcc-5-branch/libstdc++-v3/ChangeLog branches/gcc-5-branch/libstdc++-v3/include/bits/stl_stack.h