- Jan 03, 2022
-
-
Jakub Jelinek authored
-
Jakub Jelinek authored
* update-copyright.py: Add University of Illinois as external author.
-
Jakub Jelinek authored
Do this separately from all other Copyright updates, as ChangeLog files can be modified only separately.
-
Jakub Jelinek authored
Manual part of copyright year updates. 2022-01-03 Jakub Jelinek <jakub@redhat.com> gcc/ * gcc.c (process_command): Update copyright notice dates. * gcov-dump.c (print_version): Ditto. * gcov.c (print_version): Ditto. * gcov-tool.c (print_version): Ditto. * gengtype.c (create_file): Ditto. * doc/cpp.texi: Bump @copying's copyright year. * doc/cppinternals.texi: Ditto. * doc/gcc.texi: Ditto. * doc/gccint.texi: Ditto. * doc/gcov.texi: Ditto. * doc/install.texi: Ditto. * doc/invoke.texi: Ditto. gcc/ada/ * gnat_ugn.texi: Bump @copying's copyright year. * gnat_rm.texi: Likewise. gcc/d/ * gdc.texi: Bump @copyrights-d year. gcc/fortran/ * gfortranspec.c (lang_specific_driver): Update copyright notice dates. * gfc-internals.texi: Bump @copying's copyright year. * gfortran.texi: Ditto. * intrinsic.texi: Ditto. * invoke.texi: Ditto. gcc/go/ * gccgo.texi: Bump @copyrights-go year. libgomp/ * libgomp.texi: Bump @copying's copyright year. libitm/ * libitm.texi: Bump @copying's copyright year. libquadmath/ * libquadmath.texi: Bump @copying's copyright year.
-
Jakub Jelinek authored
Can't be committed together with the previous one due to the ChangeLog vs. other files restrictions.
-
Jakub Jelinek authored
2022-01-03 Jakub Jelinek <jakub@redhat.com> gcc/ * ChangeLog-2021: Rotate ChangeLog. New file. gcc/ada/ * ChangeLog-2021: Rotate ChangeLog. New file. gcc/cp/ * ChangeLog-2021: Rotate ChangeLog. New file. gcc/d/ * ChangeLog-2021: Rotate ChangeLog. New file. gcc/fortran/ * ChangeLog-2021: Rotate ChangeLog. New file. gcc/testsuite/ * ChangeLog-2021: Rotate ChangeLog. New file. libgfortran/ * ChangeLog-2021: Rotate ChangeLog. New file. libstdc++-v3/ * ChangeLog-2021: Rotate ChangeLog. New file.
-
Richard Biener authored
This adds a testcase for a fixed wrong-code bug. 2022-01-03 Richard Biener <rguenther@suse.de> PR tree-optimization/103615 * gcc.dg/torture/pr103615.c: New testcase.
-
GCC Administrator authored
-
- Jan 02, 2022
-
-
Uros Bizjak authored
This patch adds basic V2QImode infrastructure and V2QImode arithmetic operations (plus, minus and neg). The patched compiler can emit SSE vectorized QImode operations (e.g. PADDB) with partial QImode vector, and also synthesized double HI/LO QImode operations with integer registers. The testcase: typedef char __v2qi __attribute__ ((__vector_size__ (2))); __v2qi plus (__v2qi a, __v2qi b) { return a + b; }; compiles with -O2 to: movl %edi, %edx movl %esi, %eax addb %sil, %dl addb %ah, %dh movl %edx, %eax ret which is much better than what the unpatched compiler produces: movl %edi, %eax movl %esi, %edx xorl %ecx, %ecx movb %dil, %cl movsbl %dh, %edx movsbl %ah, %eax addl %edx, %eax addb %sil, %cl movb %al, %ch movl %ecx, %eax ret The V2QImode vectorization does not require vector registers, so it can be enabled by default also for 32-bit targets without SSE. The patch also enables vectorized V2QImode sign/zero extends. 2021-12-30 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/103861 * config/i386/i386.h (VALID_SSE2_REG_MODE): Add V2QImode. (VALID_INT_MODE_P): Ditto. * config/i386/i386.c (ix86_secondary_reload): Handle V2QImode reloads from SSE register to memory. (vector_mode_supported_p): Always return true for V2QImode. * config/i386/i386.md (*subqi_ext<mode>_2): New insn pattern. (*negqi_ext<mode>_2): Ditto. * config/i386/mmx.md (movv2qi): New expander. (movmisalignv2qi): Ditto. (*movv2qi_internal): New insn pattern. (*pushv2qi2): Ditto. (negv2qi2 and splitters): Ditto. (<plusminus:insn>v2qi3 and splitters): Ditto. gcc/testsuite/ChangeLog: PR target/103861 * gcc.dg/store_merging_18.c (dg-options): Add -fno-tree-vectorize. * gcc.dg/store_merging_29.c (dg-options): Ditto. * gcc.target/i386/pr103861.c: New test. * gcc.target/i386/pr92658-avx512vl.c (dg-final): Remove vpmovqb scan-assembler xfail. * gcc.target/i386/pr92658-sse4.c (dg-final): Remove pmovzxbq scan-assembler xfail. * gcc.target/i386/pr92658-sse4-2.c (dg-final): Remove pmovsxbq scan-assembler xfail. * gcc.target/i386/warn-vect-op-2.c (dg-warning): Adjust warnings.
-
John David Anglin authored
2022-01-02 John David Anglin <danglin@gcc.gnu.org> gcc/testsuite/ChangeLog: * gcc.target/hppa/shadd-2.c: Adjust count to 3. * gcc.target/hppa/shadd-3.c: Likewise.
-
John David Anglin authored
2022-01-02 John David Anglin <danglin@gcc.gnu.org> gcc/testsuite/ChangeLog: * gcc.dg/guality/example.c: Skip on hppa*-*-linux*.
-
Jason Merrill authored
While working on PR66139 I noticed that if the destructor of a temporary created during array initialization throws, we were failing to destroy the last array element constructed. Throwing destructors are rare since C++11, but this should be fixed. gcc/cp/ChangeLog: * init.c (build_vec_init): Append the decrement to elt_init. gcc/testsuite/ChangeLog: * g++.dg/eh/array2.C: New test.
-
Jason Merrill authored
Since C++11, the vast majority of destructors are noexcept, so wrap_temporary_cleanups adds a bunch of useless TRY_CATCH_EXPR to be removed later in the optimizers. It's simple to avoid adding them in the first place. gcc/cp/ChangeLog: * decl.c (wrap_cleanups_r): Don't wrap if noexcept. gcc/testsuite/ChangeLog: * g++.dg/eh/cleanup6.C: New test.
-
John David Anglin authored
2022-01-02 John David Anglin <danglin@gcc.gnu.org> libgcc/ChangeLog: * config/pa/linux-atomic.c (_ASM_EFAULT): Define. (__kernel_cmpxchg): Nullify illegal iitlbp instruction if error return is not equal _ASM_EFAULT. (__kernel_cmpxchg2): Likewise.
-
John David Anglin authored
2022-01-02 John David Anglin <danglin@gcc.gnu.org> gcc/ChangeLog: * config/pa/pa.md (atomic_storeq): Use optab_libfunc to access sync_lock_test_and_set libfunc. Call convert_memory_address to convert memory address to Pmode. (atomic_storehi, atomic_storesi, atomic_storedi): Likewise.
-
GCC Administrator authored
-
- Jan 01, 2022
-
-
Francois-Xavier Coudert authored
The darwin system headers error out on __FLT_EVAL_METHOD__ == 16, which occurs when the compiler is called with -mavx512fp16 on i386. Allow this value to proceed past the check (nothing else depends on it in the system headers). fixincludes/ChangeLog: * inclhack.def: Add new fix on darwin. * fixincl.x: Regenerate. * tests/base/math.h: Regenerate.
-
Andrew Pinski authored
These were fixed as part of the fix for PR 99766, I thought it would be useful to add a few testcases for the other cases that were failing. Committed as obvious after running the tests to make sure they work. PR rtl-optimization/100241 PR rtl-optimization/99787 gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr100241-1.c: New test. * gcc.c-torture/compile/pr99787-1.c: New test.
-
Jakub Jelinek authored
On Wed, Dec 29, 2021 at 03:54:03PM -0800, Ian Lance Taylor via Gcc-patches wrote: > PR go/103847 > * godump.c (go_force_record_alignment): Name the alignment > field "_". > --- a/gcc/godump.c > +++ b/gcc/godump.c > @@ -651,7 +651,7 @@ go_force_record_alignment (struct obstack *ob, const char *type_string, > unsigned int index, const char *error_string) > { > index = go_append_artificial_name (ob, index); > - obstack_grow (ob, "_align ", 7); > + obstack_grow (ob, "_ ", 2); > if (type_string == NULL) > obstack_grow (ob, error_string, strlen (error_string)); > else This change caused +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _ts_nested struct { u struct { s int16; Godump_0_pad \\\\[2\\\\]byte; Godump_1_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _ts_nested2 struct { u struct { Godump_0_pad \\\\[4\\\\]byte; Godump_1_pad \\\\[2\\\\]byte; s int16; c int8; Godump_2_pad +\\\\[1\\\\]byte; Godump_3_pad \\\\[2\\\\]byte; Godump_4_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsbf_gaps struct { bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\\[2\\\\]byte; s uint16; Godump_1_align \\\\[0\\\\]int32; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsbf_pad16_1 struct { Godump_0_pad \\\\[1\\\\]byte; c uint8; Godump_1_align \\\\[0\\\\]int16; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsbf_pad16_2 struct { Godump_0_pad \\\\[2\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int16; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsbf_pad32_1 struct { Godump_0_pad \\\\[1\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int32; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsbf_pad32_2 struct { Godump_0_pad \\\\[4\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int32; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsbf_pad64_1 struct { Godump_0_pad \\\\[1\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsbf_pad64_2 struct { Godump_0_pad \\\\[8\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsn_anon struct { a uint8; s uint16; b uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]int16; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tsu_anon struct { c uint8; Godump_0_pad \\\\[7\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tu1 struct { c uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tu3_size struct { ca \\\\[4\\\\+1\\\\]uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tu_nested struct { u struct { s int16; Godump_0_pad \\\\[2\\\\]byte; Godump_1_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tu_nested2 struct { u struct { Godump_0_pad \\\\[4\\\\]byte; Godump_1_pad \\\\[2\\\\]byte; s int16; c int8; Godump_2_pad +\\\\[1\\\\]byte; Godump_3_pad \\\\[2\\\\]byte; Godump_4_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^type _tu_size struct { ca \\\\[4\\\\+1\\\\]uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _s_nested struct { u struct { s int16; Godump_0_pad \\\\[2\\\\]byte; Godump_1_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _s_nested2 struct { u struct { Godump_0_pad \\\\[4\\\\]byte; Godump_1_pad \\\\[2\\\\]byte; s int16; c int8; Godump_2_pad +\\\\[1\\\\]byte; Godump_3_pad \\\\[2\\\\]byte; Godump_4_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sbf_gaps struct { bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\\[2\\\\]byte; s uint16; Godump_1_align \\\\[0\\\\]int32; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sbf_pad16_1 struct { Godump_0_pad \\\\[1\\\\]byte; c uint8; Godump_1_align \\\\[0\\\\]int16; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sbf_pad16_2 struct { Godump_0_pad \\\\[2\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int16; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sbf_pad32_1 struct { Godump_0_pad \\\\[1\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int32; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sbf_pad32_2 struct { Godump_0_pad \\\\[4\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int32; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sbf_pad64_1 struct { Godump_0_pad \\\\[1\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sbf_pad64_2 struct { Godump_0_pad \\\\[8\\\\]byte; c uint8; Godump_1_pad \\\\[.\\\\]byte; Godump_2_align \\\\[0\\\\]int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _sn_anon struct { a uint8; s uint16; b uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]int16; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _su_anon struct { c uint8; Godump_0_pad \\\\[7\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _u1 struct { c uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _u3_size struct { ca \\\\[4\\\\+1\\\\]uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _u_nested struct { u struct { s int16; Godump_0_pad \\\\[2\\\\]byte; Godump_1_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _u_nested2 struct { u struct { Godump_0_pad \\\\[4\\\\]byte; Godump_1_pad \\\\[2\\\\]byte; s int16; c int8; Godump_2_pad +\\\\[1\\\\]byte; Godump_3_pad \\\\[2\\\\]byte; Godump_4_align \\\\[0\\\\]u?int32; }; }\$ +FAIL: gcc.misc-tests/godump-1.c scan-file (?n)^var _u_size struct { ca \\\\[4\\\\+1\\\\]uint8; Godump_0_pad \\\\[.\\\\]byte; Godump_1_align \\\\[0\\\\]u?int64; }\$ on x86_64-linux. The following patch adjusts the testcase for the above change. 2022-01-01 Jakub Jelinek <jakub@redhat.com> * gcc.misc-tests/godump-1.c: Adjust for renaming of last field from _align suffix to _ suffix.
-
Jakub Jelinek authored
The r11-3302-g3696a50beeb73f changes broke the following ObjC testcase. in_statement is either 0 (not in a looping statement), various IN_* flags for various kinds of looping statements (or OpenMP structured blocks) or those flags ored with IN_SWITCH_STMT when a switch appears inside of those contexts. This is because break binds to switch in that last case, but continue binds to the looping construct in that case. The c_finish_bc_stmt function performs diagnostics on incorrect break/continue uses and then checks if in_statement & IN_OBJC_FOREACH and in that case jumps to the label provided by the caller, otherwise emits a BREAK_STMT or CONTINUE_STMT. This is incorrect if we have ObjC foreach with switch nested in it and break inside of that, in_statement in that case is IN_OBJC_FOREACH | IN_SWITCH_STMT and is_break is true. We want to handle it like other breaks inside of switch, i.e. emit a BREAK_STMT. The following patch fixes that. 2022-01-01 Jakub Jelinek <jakub@redhat.com> PR objc/103639 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of ObjC foreach, emit normal BREAK_STMT rather than goto to label. 2022-01-01 Iain Sandoe <iain@sandoe.co.uk> PR objc/103639 * objc.dg/pr103639.m: New test.
-
GCC Administrator authored
-
- Dec 31, 2021
-
-
Francois-Xavier Coudert authored
REAL128 is a named constant, so we cannot simply use (REAL128 > 0) to conditionally compile for targets with REAL128. gcc/testsuite/ChangeLog: PR fortran/89639 * gfortran.dg/ieee/ieee_9.f90: Adjust test for targets without REAL128.
-
Iain Sandoe authored
Although we build the library with GCC which is known to support _Static_assert this might be done on a system without the macro mapping static_assert to the compiler keyword. The use of static_assert introduced with r12-6126-g3430132f3e82 causes bootstrap to fail on such targets, fixed by using the keyword directly. Signed-off-by:
Iain Sandoe <iain@sandoe.co.uk> libgfortran/ChangeLog: * runtime/string.c (gfc_itoa): Use _Static_assert directly instead of via the static_assert macro.
-
Uros Bizjak authored
... for targets that support vectorization of 2-byte char stores with unaligned address at plain O2. 2021-12-31 Uroš Bizjak <ubizjak@gmail.com> gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_vect_slp_store_usage): Handle TEST_V2QI_2. (check_effective_target_vect_slp_v2qi_store_unalign): New procedure. * c-c++-common/Wstringop-overflow-2.c: XFAIL specific tests for vect_slp_v2qi_store_unalign targets. * g++.dg/warn/Wstringop-overflow-3.C: Ditto. * gcc.dg/Wstringop-overflow-28.c: Ditto. * gcc.dg/Wstringop-overflow-68.c: Ditto. * gcc.dg/Wstringop-overflow-75.c: Ditto. * gcc.dg/Wstringop-overflow-76.c: Ditto.
-
GCC Administrator authored
-
- Dec 30, 2021
-
-
Jakub Jelinek authored
The r12-5978 change caused a -fcompare-debug issue, because without -g a chain might start with a noop move, but with -g there could be one or more DEBUG_INSNs in the chain before the noop move and so regrename could make different decisions between -g and -g0. Note, I must say I don't really understand the original change much, if we want to make sure the noop moves are removed, couldn't regrename during building of those du chains simply remove the noop moves instead? 2021-12-30 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/103756 * regrename.c (find_rename_reg): Test noop_move_p on the first non-debug insn in the chain rather than on the first insn. * g++.dg/opt/pr103756.C: New test.
-
Jakub Jelinek authored
In the following testcase we incorrectly error about pasting / token with padding token (which is a result of __VA_OPT__); instead we should like e.g. for ##arg where arg is empty macro argument clear PASTE_LEFT flag of the previous token if __VA_OPT__ doesn't add any real tokens (which can happen either because the macro doesn't have any tokens passed to ... (i.e. __VA_ARGS__ expands to empty) or when __VA_OPT__ doesn't have any tokens in between ()s). 2021-12-30 Jakub Jelinek <jakub@redhat.com> PR preprocessor/89971 libcpp/ * macro.c (replace_args): For ##__VA_OPT__, if __VA_OPT__ expands to no tokens at all, drop PASTE_LEFT flag from the previous token. gcc/testsuite/ * c-c++-common/cpp/va-opt-9.c: New test.
-
Lancelot SIX authored
Currently libiberty fails to demangle the name of cloned functions if the clone-type-identifier contains numbers. This can be observed with the following example: $ cat > ex.cc <<EOT void foo (float *, float *) __attribute__((target_clones("avx2,avx,sse4.1,default"))); void foo (float *, float *) {} EOT $ gcc -c ex.cc $ nm -C ex.o | grep foo 0000000000000000 i foo(float*, float*) 0000000000000026 t foo(float*, float*) [clone .avx.1] 0000000000000013 t _Z3fooPfS_.avx2.0 0000000000000000 t foo(float*, float*) [clone .default.3] 0000000000000000 W foo(float*, float*) [clone .resolver] 0000000000000039 t _Z3fooPfS_.sse4_1.2 In this example, gcc creates clones for the FOO function, each matching one of the specified targets. When inspecting the binary, nm (and other libiberty-based tools, including gdb) fails to demangle the symbol names if the clone identifier contains numbers. Form my understanding of the mangling convention[1], clone names are part of vendor-specific suffixes and do not have rule preventing them from containing digits. This commit proposes to fix the demangling. With this commit (ported to binutils), nm gives the following output: $ nm-new -C ex.o | grep foo 0000000000000000 i foo(float*, float*) 0000000000000026 t foo(float*, float*) [clone .avx.1] 0000000000000013 t foo(float*, float*) [clone .avx2.0] 0000000000000000 t foo(float*, float*) [clone .default.3] 0000000000000000 W foo(float*, float*) [clone .resolver] 0000000000000039 t foo(float*, float*) [clone .sse4_1.2] Tested on x86_86-linux with 'make check-libiberty'. [1] https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling libiberty/ChangeLog: * cp-demangle.c (d_clone_suffix): Support digits in clone tag names. * testsuite/demangle-expected: Check demangling of clone symbols with digits in name.
-
Jakub Jelinek authored
We get a -fcompare-debug FAIL on the following testcase. The problem is that during cprop we get when a TImode pseudo holding x is being constructed: (debug_insn 111 59 103 7 (var_location:TI D#2 (clobber (const_int 0 [0]))) -1 (nil)) (insn 103 111 110 7 (clobber (reg/v:TI 89 [ x ])) "pr103808.c":8:9 -1 (nil)) (debug_insn 110 103 104 7 (var_location:TI D#2 (subreg:TI (reg:DI 111 [ x ]) 0)) -1 (nil)) (insn 104 110 109 7 (set (subreg:DI (reg/v:TI 89 [ x ]) 0) (reg:DI 111 [ x ])) "pr103808.c":8:9 80 {*movdi_internal} (expr_list:REG_DEAD (reg:DI 111 [ x ]) (nil))) Now, during RA that paradoxical subreg in a debug insn obviously can't affect where pseudo 111 is allocated and RA puts it into the bp register, so we have: (debug_insn 110 111 109 4 (var_location:TI D#2 (reg:TI 6 bp [orig:111 x ] [111])) -1 (nil)) Now, during var-tracking when we for: (debug_insn 25 23 26 3 (var_location:TI x (concatn/v:TI [ (reg:DI 6 bp [orig:111 x ] [111]) (subreg:DI (debug_expr:TI D#2) 8) ])) "pr103808.c":8:9 -1 (nil)) try to simplify the highpart subreg of bp, gen_rtx_REG_offset is called in: if (HARD_REGISTER_NUM_P (final_regno)) { rtx x = gen_rtx_REG_offset (op, outermode, final_regno, subreg_memory_offset (outermode, innermode, byte)); and that unfortunately sets REG_ATTRS on stack_pointer_rtx, because gen_rtx_REG_offset uses gen_rtx_REG which for Pmode STACK_POINTER_REGNUM returns stack_pointer_rtx rather than newly created register. The clobbering of REG_ATTRS on the shared stack_pointer_rtx then shows up in the dumps as (reg/f:DI 7 sp [ x+8 ]) instead of (reg/f:DI 7 sp) that shows up without var-tracking. Clobbering of REG_ATTRS on the shared *_pointer_rtx looks just wrong. So, IMHO either simplify_gen_subreg -> gen_rtx_REG_offset should call gen_raw_REG to make sure we get a new non-shared REG we can set REG_ATTRS on, or we should make sure that we don't overwrite the REG_ATTRS on the shared REGs (but then simplify_gen_subreg shouldn't try to overwrite ORIGINAL_REGNO on those either). For non-DEBUG_INSNs, I'd hope this never happens, the RA shouldn't allocate multi-word regs overlapping with stack pointer, hard frame pointer etc. 2021-12-30 Jakub Jelinek <jakub@redhat.com> PR debug/103808 * emit-rtl.c (gen_rtx_REG_offset): Use gen_raw_REG instead of gen_rtx_REG. * gcc.dg/pr103808.c: New test.
-
Martin Liska authored
gcc/ChangeLog: * doc/cpp.texi: Add missing dash for argument.
-
Jakub Jelinek authored
c-family: Use BULTINS_LOCATION for predefined macros changed upon optimize or target pragmas [PR103012] The following testcases ICE when an optimize or target pragma is followed by a long line (4096+ chars). This is because on such long lines we can't use columns anymore, but the cpp_define calls performed by c_cpp_builtins_optimize_pragma or from the backend hooks for target pragma are done on temporary buffers and expect to get columns from whatever line they appear on (which happens to be the long line after optimize/target pragma), and we run into: #0 fancy_abort (file=0x3abec67 "../../libcpp/line-map.c", line=502, function=0x3abecfc "linemap_add") at ../../gcc/diagnostic.c:1986 #1 0x0000000002e7c335 in linemap_add (set=0x7ffff7fca000, reason=LC_RENAME, sysp=0, to_file=0x41287a0 "pr103012.i", to_line=3) at ../../libcpp/line-map.c:502 #2 0x0000000002e7cc24 in linemap_line_start (set=0x7ffff7fca000, to_line=3, max_column_hint=128) at ../../libcpp/line-map.c:827 #3 0x0000000002e7ce2b in linemap_position_for_column (set=0x7ffff7fca000, to_column=1) at ../../libcpp/line-map.c:898 #4 0x0000000002e771f9 in _cpp_lex_direct (pfile=0x40c3b60) at ../../libcpp/lex.c:3592 #5 0x0000000002e76c3e in _cpp_lex_token (pfile=0x40c3b60) at ../../libcpp/lex.c:3394 #6 0x0000000002e610ef in lex_macro_node (pfile=0x40c3b60, is_def_or_undef=true) at ../../libcpp/directives.c:601 #7 0x0000000002e61226 in do_define (pfile=0x40c3b60) at ../../libcpp/directives.c:639 #8 0x0000000002e610b2 in run_directive (pfile=0x40c3b60, dir_no=0, buf=0x7fffffffd430 "__OPTIMIZE__ 1\n", count=14) at ../../libcpp/directives.c:589 #9 0x0000000002e650c1 in cpp_define (pfile=0x40c3b60, str=0x2f784d1 "__OPTIMIZE__") at ../../libcpp/directives.c:2513 #10 0x0000000002e65100 in cpp_define_unused (pfile=0x40c3b60, str=0x2f784d1 "__OPTIMIZE__") at ../../libcpp/directives.c:2522 #11 0x0000000000f50685 in c_cpp_builtins_optimize_pragma (pfile=0x40c3b60, prev_tree=<optimization_node 0x7fffea042000>, cur_tree=<optimization_node 0x7fffea042020>) at ../../gcc/c-family/c-cppbuiltin.c:600 assertion that LC_RENAME doesn't happen first. I think the right fix is emit those predefined macros upon optimize/target pragmas with BUILTINS_LOCATION, like we already do for those macros at the start of the TU, they don't appear in columns of the next line after it. Another possibility would be to force them at the location of the pragma. 2021-12-30 Jakub Jelinek <jakub@redhat.com> PR c++/103012 gcc/ * config/i386/i386-c.c (ix86_pragma_target_parse): Perform cpp_define/cpp_undef calls with forced token locations BUILTINS_LOCATION. * config/arm/arm-c.c (arm_pragma_target_parse): Likewise. * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse): Likewise. * config/s390/s390-c.c (s390_pragma_target_parse): Likewise. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform cpp_define_unused/cpp_undef calls with forced token locations BUILTINS_LOCATION. gcc/testsuite/ PR c++/103012 * g++.dg/cpp/pr103012.C: New test. * g++.target/i386/pr103012.C: New test.
-
Jakub Jelinek authored
The following testcase is miscompiled, because a prologue which contains subq $8, %rsp instruction is emitted at the start of a basic block which contains conditional jump that depends on flags register set in an earlier basic block, the prologue instruction then clobbers those flags. Normally this case is checked by can_get_prologue predicate, but this is done only at the start of the loop. If we update pro later in the loop (because some bb shouldn't be duplicated) and then don't push anything further into vec and the vec is already empty (this can happen when the new pro is already in bb_with bitmask and either has no successors (that is the case in the testcase where that bb ends with a trap) or all the successors are already in bb_with, then the loop doesn't iterate further and can_get_prologue will not be checked. The following simple patch makes sure we call can_get_prologue even after the last former iteration when vec is already empty and only break from the loop afterwards (and only if the updating of pro done because of !can_get_prologue didn't push anything into vec again). 2021-12-30 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/103860 * shrink-wrap.c (try_shrink_wrapping): Make sure can_get_prologue is called on pro even if nothing further is pushed into vec. * gcc.dg/pr103860.c: New test.
-
Xionghu Luo authored
gcc/ChangeLog: 2021-12-30 Xionghu Luo <luoxhu@linux.ibm.com> * loop-invariant.c (find_invariants_bb): Check profile count before motion. (find_invariants_body): Add argument. gcc/testsuite/ChangeLog: 2021-12-30 Xionghu Luo <luoxhu@linux.ibm.com> * gcc.dg/loop-invariant-2.c: New.
-
GCC Administrator authored
-
- Dec 29, 2021
-
-
Ian Lance Taylor authored
Change the compiler to not add zero padding because of zero-sized fields named "_", since those can't be referenced anyhow. Change the sparc-linux64 epollevent struct to name the alignment field "_", to avoid zero padding. Fixes PR go/103847 PR go/103847 * godump.c (go_force_record_alignment): Name the alignment field "_". Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/374914
-
Jakub Jelinek authored
make_forwarders_with_degenerate_phis causes a -fcompare-debug failure on the following testcase. The problem is that on: # iftmp.4_8 = PHI <&D.2582(6), &D.2583(4), &D.2582(7), &D.2583(5)> the exact DECL_UIDs are different between -g and -g0 (which is ok, with -g the decls can have larger gaps in between the uids), which means iterative_hash_expr is different and because there are 2 pairs of edges with matching phi arguments, the function processes them in different orders. The following patch fixes it by using the iterative_hash_expr order only to determine which arguments are the same, then replaces the hashes with the minimum dest_idx in the set of matching arguments and qsorts again (which makes it stable for -fcompare-debug) and only splits edges etc. on that stable order. As a small optimization, if no arguments are equal, it doesn't do the second qsort and continues, and if all arguments of the PHI are constants or SSA_NAMEs (I think that is a pretty common case for many PHIs), then it doesn't do the second qsort either, because in that case the hash values will be stable, only computed from the constant values or SSA_NAME_VERSIONs. 2021-12-29 Jakub Jelinek <jakub@redhat.com> PR debug/103742 * tree-ssa-dce.c (make_forwarders_with_degenerate_phis): If any phi argument is not CONSTANT_CLASS_P or SSA_NAME and any arguments are equal, change second from hash value to lowest dest_idx from the edges which have equal argument and resort to ensure -fcompare-debug stability. * g++.dg/opt/pr103742.C: New test.
-
Francois-Xavier Coudert authored
Fortran 2018 added some synonyms to the existing values, namely IEEE_NEGATIVE_SUBNORMAL (which is the same as IEEE_NEGATIVE_DENORMAL) and IEEE_POSITIVE_SUBNORMAL (same as IEEE_POSITIVE_DENORMAL). When they were added to the C side, they were not kept in sync with the Fortran part of the library. Thew new values are not used (yet), so it is currently harmless, but better fix it. libgfortran/ChangeLog: * ieee/ieee_helper.c: Fix enum values.
-
Francois-Xavier Coudert authored
Warnings like: warning: using serial compilation of 2 LTRANS jobs warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text are pruned by lto.exp, but not for LTO testcases when run in other parts of the testsuite. They will be, now. gcc/testsuite/ChangeLog: PR testsuite/47334 PR testsuite/103823 * lib/prune.exp: Prune some warnings related to LTO and visibility.
-
Harald Anlauf authored
gcc/fortran/ChangeLog: PR fortran/102332 * expr.c (gfc_get_variable_expr): Avoid NULL pointer dereferences during handling of errors with invalid uses of CLASS variables. * match.c (select_type_set_tmp): Likewise. * primary.c (gfc_match_varspec): Likewise. * resolve.c (resolve_variable): Likewise. (resolve_select_type): Likewise. gcc/testsuite/ChangeLog: PR fortran/102332 * gfortran.dg/pr102332.f90: New test.
-
Martin Liska authored
gcc/ChangeLog: * collect2.c (main): Add ld.mold. * common.opt: Add -fuse-ld=mold. * doc/invoke.texi: Document it. * gcc.c (driver_handle_option): Handle -fuse-ld=mold. * opts.c (common_handle_option): Likewise.
-