Age | Commit message (Collapse) | Author | Files | Lines |
|
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Support digits in PR's
component in subject.
|
|
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Allow digit in component name.
contrib/ChangeLog:
* gcc-changelog/test_email.py: Add new test.
* gcc-changelog/test_patches.txt: Add new patch.
|
|
The test casts a pointer to long, which is ok for ilp32 and lp64
targets but not for llp64 targets. Nothing reads the values later,
it is a link test, so all we care about is that it is the same
cast on s390x-linux where it used to fail before the PR64536 fix,
and that we don't warn about it.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108151
* gcc.dg/pr64536.c (bar): Use casts to __INTPTR_TYPE__ rather than
long when casting pointer to integral type.
|
|
In this PR we ICE when expanding the __rbit builtin with a NULL target rtx.
I *think* that only happens when the result is unused and hence maybe we shouldn't be expanding
any RTL at all, but the ICE here is easily fixed by deriving the mode from the type of the expression
rather than the target.
This patch does that.
Bootstrapped and tested on aarch64-none-linux-gnu.
gcc/ChangeLog:
PR target/108140
* config/aarch64/aarch64-builtins.cc
(aarch64_expand_builtin_data_intrinsic): Handle NULL target.
gcc/testsuite/ChangeLog:
PR target/108140
* gcc.target/aarch64/acle/pr108140.c: New test.
|
|
git_email.py prints now a warning for files added automatically.
git_check_commit.py does likewise but only with --verbose.
It prints one line per ChangeLog file, either stating the file
or if more than one the number of files.
contrib/ChangeLog:
* gcc-changelog/git_check_commit.py (__main__): With -v print a
warning for the auto-added files.
* gcc-changelog/git_commit.py (GitCommit.__init__): Add self.warnings.
(GitCommit.check_mentioned_files): Add warning for auto-added files.
(GitCommit.print_warnings): New function.
* gcc-changelog/git_email.py (__main__): Remove bogus argument to
GitEmail constructor; print auto-added-files warning.
* gcc-changelog/test_email.py (test_auto_add_file_1,
test_auto_add_file_2): New tests.
* gcc-changelog/test_patches.txt: Add two test cases.
|
|
The pr107397.f90 test FAILs for me, one problem was that the
added diagnostics has an indefinite article before BOZ, but
the test dg-error didn't. The other problem was that on the
other dg-error there was no space between the string and closing
}, so it was completely ignored and the error was an excess
error.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR fortran/107397
* gfortran.dg/pr107397.f90: Adjust expected diagnostic wording and
add space between dg-error string and closing }.
|
|
I've noticed an inconsistency with the other sanitizers.
For -fsanitize={address,thread,leak} we link into binaries
lib*san_preinit.o such that the -lasan, -ltsan or -llsan libraries
are initialized as early as possible through .preinit_array.
The hwasan library has the same thing, but we strangely compiled
it into the library (where it apparently didn't do anything,
.preinit_array doesn't seem to be created for shared libraries),
rather than installing it like in the other 3 cases.
The following patch handles it for hwasan similarly to asan, tsan and lsan.
I don't have any hw with hwasan support, so I've just checked it
builds and installs as expected and that
gcc -fsanitize=hwaddress -o a a.c -mlam=u57
on trivial main results in .preinit_array section in the binary.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
* config/gnu-user.h (LIBHWASAN_EARLY_SPEC): Add libhwasan_preinit.o
to link spec if not -shared.
* hwasan/Makefile.am (nodist_toolexeclib_HEADERS): Set to
libhwasan_preinit.o.
(hwasan_files): Remove hwasan_preinit.cpp.
(libhwasan_preinit.o): Copy from hwasan_preinit.o.
* hwasan/Makefile.in: Regenerated.
|
|
This patch is preparing patch for the following patch (VSETVL PASS)
support since the current vlmul printing rule is not appropriate
information for VSETVL PASS. I split this fix in a single patch.
gcc/ChangeLog:
* config/riscv/riscv-v.cc (emit_vlmax_vsetvl): Pass through VLMUL enum
instead of machine mode.
* config/riscv/riscv-vector-builtins-bases.cc: Ditto.
* config/riscv/riscv.cc (riscv_print_operand): Print LMUL by enum vlmul
instead of machine mode.
|
|
gcc/testsuite:
* gcc.target/riscv/rvv/base/vread_csr.c: Use specific option
instead.
* gcc.target/riscv/rvv/base/vwrite_csr.c: Ditto.
|
|
For constant C:
If '(c & 0xFFFFFFFF00008000ULL) == 0xFFFFFFFF00008000ULL' or say:
32(1) || 16(x) || 1(1) || 15(x), using "li; xoris" would be ok.
If '(c & 0xFFFFFFFF80008000ULL) == 0x80000000ULL' or say:
32(0) || 1(1) || 15(x) || 1(0) || 15(x), we could use "li; oris" to
build constant 'C'.
Here N(M) means N continuous bit M, x for M means it is ok for either
1 or 0; '||' means concatenation.
This patch update rs6000_emit_set_long_const to support those constants.
PR target/106708
gcc/ChangeLog:
* config/rs6000/rs6000.cc (rs6000_emit_set_long_const): Add using
"li; x?oris" to build constant.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr106708.c: New test.
|
|
The flake8 pytest plug-in is broken and we should not use it.
contrib/ChangeLog:
* gcc-changelog/setup.cfg: Do not use flake8 pytest plug-in.
|
|
Don't add crtfastmath.o for -shared to avoid changing the MXCSR register
when loading a shared library. crtfastmath.o will be used only when
building executables.
PR target/55522
* config/i386/gnu-user-common.h (GNU_USER_TARGET_MATHFILE_SPEC):
Don't add crtfastmath.o for -shared.
* doc/invoke.texi (-shared): Add related documentation.
|
|
Use wrapper of riscv_vector.h for RVV related testcases,
more detail see https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603140.html
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/mov-1.c: Use double quotes to
include riscv_vector.h rather than angle brackets.
* gcc.target/riscv/rvv/base/mov-10.c: Ditto.
* gcc.target/riscv/rvv/base/mov-11.c: Ditto.
* gcc.target/riscv/rvv/base/mov-12.c: Ditto.
* gcc.target/riscv/rvv/base/mov-13.c: Ditto.
* gcc.target/riscv/rvv/base/mov-2.c: Ditto.
* gcc.target/riscv/rvv/base/mov-3.c: Ditto.
* gcc.target/riscv/rvv/base/mov-4.c: Ditto.
* gcc.target/riscv/rvv/base/mov-5.c: Ditto.
* gcc.target/riscv/rvv/base/mov-6.c: Ditto.
* gcc.target/riscv/rvv/base/mov-7.c: Ditto.
* gcc.target/riscv/rvv/base/mov-8.c: Ditto.
* gcc.target/riscv/rvv/base/mov-9.c: Ditto.
* gcc.target/riscv/rvv/base/vread_csr.c: Ditto.
* gcc.target/riscv/rvv/base/vsetvl-1.c: Ditto.
* gcc.target/riscv/rvv/base/vwrite_csr.c: Ditto.
|
|
|
|
This patch implements the Solaris 11.[0-3] obsoletion just announced in
https://gcc.gnu.org/pipermail/gcc/2022-December/240322.html
Bootstrapped without regressions on Solaris 11.3 (i386-pc-solaris2.11,
sparc-sun-solaris2.11 without and with --enable-obsolete) and 11.4.
2022-12-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc:
* config.gcc: Determine Solaris minor version.
Obsolete *-*-solaris2.11.[0-3]*.
* doc/install.texi (Specific, *-*-solaris2*): Document it.
|
|
Change time unit to 1 jiffy (with respect to TimerHandler.def) rather
than a second.
gcc/testsuite/ChangeLog:
* gm2/pimcoroutines/run/pass/testtime.mod: Reduce sleep times in
the test by a factor of 25.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
|
|
PR fortran/107397
gcc/fortran/ChangeLog:
* decl.cc (add_init_expr_to_sym): Add check with new error message.
gcc/testsuite/ChangeLog:
* gfortran.dg/pr107397.f90: New test.
|
|
|
|
Use 0 for the "lang" identifier for Rust, just like we do for all other
source languages without assigned language code (0 means "C").
Tested on powerpc64-linux. Without this patch there are ICEs galore in
the gm2 testsuite for 64-bit Linux targets, and with the ptch there are
just a few FAILs.
2022-12-17 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000-logue.cc (rs6000_output_function_epilogue):
Handle GNU Rust for the tbtab lang field.
|
|
Here we're rejecting the use of the lambda capture of 't' (of empty
type) as a template argument ultimately because convert_nontype_argument
checks constantness using is_constant_expression, which returns false
for lambda captures since want_rval=false. But in this case I believe
an lvalue-to-rvalue conversion of the argument is implied, so we should
be using is_rvalue_constant_expression instead (which would return true
here).
However, it doesn't seem necessary to consider constantness at all
when deciding whether to instantiate a non-dependent argument in
convert_nontype_argument. So this patch gets rid of the problematic
constantness test altogether, which incidentally also fixes the similar
dg-ice'd testcase from PR87765. This is in line with a similar
change we made to finish_decltype_type in r12-7564-gec0f53a3a542e7.
PR c++/107437
PR c++/87765
gcc/cp/ChangeLog:
* pt.cc (convert_nontype_argument): Relax is_nondep_const_expr
test to !inst_dep_expr_p.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1y/lambda-generic-107437.C: New test.
* g++.dg/cpp1z/constexpr-lambda26.C: Remove dg-ice.
|
|
* elf.c (elf_fetch_backward_init): New static function.
(ZSTD_TABLE_SIZE): Use huffman scratch space size rather than
literal size.
(ZSTD_TABLE_WORK_LIT_SIZE): Don't define.
(elf_zstd_read_huff): Use elf_fetch_backward_init.
(elf_zstd_read_literals): New static function.
(ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define.
(struct elf_zstd_literals): Don't define.
(elf_zstd_literal_output): Remove static function.
(elf_zstd_decompress): Use elf_fetch_backward_init and
elf_zstd_read_literals. Rewrite literal copying.<
|
|
|
|
When registering an unwind frame with __register_frame_info_bases
we currently initialize that fde object eagerly. This has the
advantage that it is immutable afterwards and we can safely
access it from multiple threads, but it has the disadvantage
that we pay the initialization cost even if the application
never throws an exception.
This commit changes the logic to initialize the objects lazily.
The objects themselves are inserted into the b-tree when
registering the frame, but the sorted fde_vector is
not constructed yet. Only on the first time that an
exception tries to pass through the registered code the
object is initialized. We notice that with a double checking,
first doing a relaxed load of the sorted bit and then re-checking
under a mutex when the object was not initialized yet.
Note that the check must implicitly be safe concering a concurrent
frame deregistration, as trying the deregister a frame that is
on the unwinding path of a concurrent exception is inherently racy.
libgcc/ChangeLog:
* unwind-dw2-fde.c: Initialize fde object lazily when
the first exception tries to pass through.
|
|
When registering a dynamic unwinding frame the fde list is sorted.
Previously, we split the list into a sorted and an unsorted part,
sorted the later using heap sort, and merged both. That can be
quite slow due to the large number of (expensive) comparisons.
This patch replaces that logic with a radix sort instead. The
radix sort uses the same amount of memory as the old logic,
using the second list as auxiliary space, and it includes two
techniques to speed up sorting: First, it computes the pointer
addresses for blocks of values, reducing the decoding overhead.
And it recognizes when the data has reached a sorted state,
allowing for early termination. When running out of memory
we fall back to pure heap sort, as before.
For this test program
\#include <cstdio>
int main(int argc, char** argv) {
return 0;
}
compiled with g++ -O -o hello -static hello.c we get with
perf stat -r 200 on a 5950X the following performance numbers:
old logic:
0,20 msec task-clock
930.834 cycles
3.079.765 instructions
0,00030478 +- 0,00000237 seconds time elapsed
new logic:
0,10 msec task-clock
473.269 cycles
1.239.077 instructions
0,00021119 +- 0,00000168 seconds time elapsed
libgcc/ChangeLog:
* unwind-dw2-fde.c: Use radix sort instead of split+sort+merge.
|
|
2022-12-16 John David Anglin <danglin@gcc.gnu.org>
libstdc++-v3/ChangeLog:
* config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
|
|
Some package builds enable -fstack-protector and -Werror. Since
-fstack-protector is not supported on hppa because the stack grows
up, these packages must check for the warning generated by
-fstack-protector and suppress it on hppa. This is problematic
since hppa is the only significant architecture where the stack
grows up.
2022-12-16 John David Anglin <danglin@gcc.gnu.org>
gcc/ChangeLog:
* config/pa/pa.cc (pa_option_override): Disable -fstack-protector.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_static): Return 0
on hppa*-*-*.
|
|
This was approved for C++23 last month in Kona.
libstdc++-v3/ChangeLog:
* include/std/expected (expected): Add monadic operations.
(expected<void, E>): Likewise.
* include/std/version (__cpp_lib_expected): Bump value.
* testsuite/20_util/expected/synopsis.cc: Adjust expected macro
value.
* testsuite/20_util/expected/version.cc: Likewise.
* testsuite/20_util/expected/illformed_neg.cc: Prune additional
errors from ill-formed monadic operations.
* testsuite/20_util/expected/observers.cc: Check error_or.
* testsuite/20_util/expected/monadic.cc: New test.
|
|
This fixes some bugs in the swap functions for std::expected.
It also disables the noexcept-specifiers for equality operators, because
those are problematic when querying whether a std::expected is equality
comparable. The operator==(const expected<T,E>&, const U&) function is
not constrained, so is viable for comparing expected<T,E> with
expected<void,G>, but then we get an error from the noexcept-specifier.
libstdc++-v3/ChangeLog:
* include/std/expected (expected::_M_swap_val_unex): Guard the
correct object.
(expected::swap): Move is_swappable
requirement from static_assert to constraint.
(swap): Likewise.
(operator==): Remove noexcept-specifier.
* testsuite/20_util/expected/swap.cc: Check swapping of
types without non-throwing move constructor. Check constraints
on swap.
* testsuite/20_util/expected/unexpected.cc: Check constraints on
swap.
* testsuite/20_util/expected/equality.cc: New test.
|
|
This adds a static assertion to std::allocator_traits::rebind_alloc to
diagnose violations of the rule that rebinding an allocator to its own
value type yields the same allocator type.
This helps to catch the easy mistake of deriving from std::allocator but
forgetting to override the rebind behaviour (no longer an issue in C++20
as std::allocator doesn't have a rebind member that can be inherited).
It also catches bugs like in 23_containers/vector/52591.cc where a typo
means the rebound allocator is a completely different type.
I initially wanted to put this static assert into the body of
allocator_traits:
static_assert(is_same<rebind_alloc<value_type>, _Alloc>::value,
"rebind_alloc<value_type> must be Alloc");
However, this causes a regression in the test for PR libstdc++/72792.
It seems that instantiating std::allocator_traits should be allowed for
invalid allocator types as long as you don't try to rebind them. To
support that, only assert in the __allocator_traits_base::__rebind class
template (in both the primary template and the partial specialization).
As a result, the bug in 20_util/scoped_allocator/outermost.cc is not
diagnosed, because nothing in that test rebinds the allocator.
libstdc++-v3/ChangeLog:
* include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
Add static assert for rebind requirement.
* testsuite/20_util/allocator_traits/members/rebind_alloc.cc:
Fix invalid rebind member in test allocator.
* testsuite/20_util/allocator_traits/requirements/rebind_neg.cc:
New test.
* testsuite/20_util/scoped_allocator/outermost.cc: Add rebind to
test allocator.
* testsuite/23_containers/forward_list/48101_neg.cc: Prune new
static assert error.
* testsuite/23_containers/unordered_multiset/48101_neg.cc:
Likewise.
* testsuite/23_containers/unordered_set/48101_neg.cc:
Likewise.
* testsuite/23_containers/vector/52591.cc: Fix typo in rebind.
|
|
The PR reports that using integer_zero_node triggers a warning for
-Wzero-as-null-pointer-constant which comes from compiler-generated code so
makes no sense to the end user.
Co-Authored-By: Iain Sandoe <iain@sandoe.co.uk>
PR c++/107768
gcc/cp/ChangeLog:
* coroutines.cc (coro_rewrite_function_body): Initialize pointers
from nullptr_node. (morph_fn_to_coro): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/pr107768.C: New test.
|
|
PR analyzer/106479 notes that we don't always show the region-creation
event for a memmove from an uninitialized stack region. This occurs
when using kf_memcpy_memmove. Fix by passing a src_region hint to
region_model::check_for_poison.
gcc/analyzer/ChangeLog:
PR analyzer/106479
* kf.cc (kf_memcpy_memmove::impl_call_pre): Pass in source region
to region_model::check_for_poison.
* region-model-asm.cc (region_model::on_asm_stmt): Pass NULL
region to region_model::check_for_poison.
* region-model.cc (region_model::check_for_poison): Add
"src_region" param, and pass it to poisoned_value_diagnostic.
(region_model::on_assignment): Pass NULL region to
region_model::check_for_poison.
(region_model::get_rvalue): Likewise.
* region-model.h (region_model::check_for_poison): Add
"src_region" param.
* sm-fd.cc (fd_state_machine::on_accept): Pass in source region
to region_model::check_for_poison.
* varargs.cc (kf_va_copy::impl_call_pre): Pass NULL region to
region_model::check_for_poison.
(kf_va_arg::impl_call_pre): Pass in source region to
region_model::check_for_poison.
gcc/testsuite/ChangeLog:
PR analyzer/106479
* gcc.dg/analyzer/pr104308.c (test_memmove_within_uninit): Remove
xfail on region creation event.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
move cost calculation"
The patch resulted in new PRs:
PR target/108145
PR testsuite/108141
So I am reverting the patch.
This reverts commit 12abd5a7d13209f79664ea603b3f3517f71b8c4f.
|
|
'-Wstrict-flex-arrays'
Warn about inproper usages of flexible array members according to
the LEVEL of the 'strict_flex_array (LEVEL)' attribute attached to
the trailing array field of a structure if it's available,
otherwise according to the LEVEL of the option
'-fstrict-flex-arrays=LEVEL'.
This option is effective only when LEVEL is bigger than 0.
Otherwise, it will be ignored with a warning.
when LEVEL=1, warnings will be issued for a trailing array
reference of a structure that have 2 or more elements if the
trailing array is referenced as a flexible array member.
when LEVEL=2, in addition to LEVEL=1, additional warnings will be
issued for a trailing one-element array reference of a structure if
the array is referenced as a flexible array member.
when LEVEL=3, in addition to LEVEL=2, additional warnings will be
issued for a trailing zero-length array reference of a structure if
the array is referenced as a flexible array member.
gcc/ChangeLog:
* doc/invoke.texi: Document -Wstrict-flex-arrays option.
* gimple-array-bounds.cc (check_out_of_bounds_and_warn): Add two more
arguments.
(array_bounds_checker::check_array_ref): Issue warnings for
-Wstrict-flex-arrays.
* opts.cc (finish_options): Issue warning for unsupported combination
of -Wstrict_flex_arrays and -fstrict-flex-array.
* tree-vrp.cc (execute_ranger_vrp): Enable the pass when
warn_strict_flex_array is true.
gcc/c-family/ChangeLog:
* c.opt (Wstrict-flex-arrays): New option.
gcc/testsuite/ChangeLog:
* gcc.dg/Warray-bounds-flex-arrays-1.c: Update testing case with
-Wstrict-flex-arrays.
* gcc.dg/Warray-bounds-flex-arrays-2.c: Likewise.
* gcc.dg/Warray-bounds-flex-arrays-3.c: Likewise.
* gcc.dg/Warray-bounds-flex-arrays-4.c: Likewise.
* gcc.dg/Warray-bounds-flex-arrays-5.c: Likewise.
* gcc.dg/Warray-bounds-flex-arrays-6.c: Likewise.
* c-c++-common/Wstrict-flex-arrays.c: New test.
* gcc.dg/Wstrict-flex-arrays-2.c: New test.
* gcc.dg/Wstrict-flex-arrays-3.c: New test.
* gcc.dg/Wstrict-flex-arrays.c: New test.
|
|
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_option_override): Fix comment
wording.
|
|
gcc/ChangeLog:
* doc/extend.texi (__builtin_riscv_pause): Imply
Xgnuzihintpausestate.
|
|
I think an alternative fix would be something like:
_M_ptr = std::exchange(rhs._M_ptr, nullptr);
_M_refcount = std::move(rhs._M_refcount);
The standard's move-and-swap implementation generates smaller code at
all levels except -O0 and -Og, so it seems simplest to just do what the
standard says.
libstdc++-v3/ChangeLog:
PR libstdc++/108118
* include/bits/shared_ptr_base.h (weak_ptr::operator=):
Implement as move-and-swap exactly as specified in the standard.
* testsuite/20_util/weak_ptr/cons/self_move.cc: New test.
|
|
contrib/ChangeLog:
* filter-clang-warnings.py: Print each warning only one time.
|
|
r0-89280-g129a37fc319db8 added unsharing to remap_ssa_name but
that wasn't in the version of the patch posted. That has some
non-trivial cost through mostly_copy_tree_r and copy_tree_r but
more importantly it doesn't seem to be necessary. I've successfully
bootstrapped and tested with an assert we only get
tree_node_can_be_shared trees here.
Bootstrapped and tested on x86_64-unknown-linux-gnu with all
languages.
PR middle-end/108086
* tree-inline.cc (remap_ssa_name): Do not unshare the
result from the decl_map.
|
|
Use rather PatchSet constructor where we can pass
properly opened file with newline='\n'.
contrib/ChangeLog:
* gcc-changelog/git_email.py: Use PatchSet constructor
as newline argument is not supported with older unidiff
library.
|
|
Commit "unidiff: use newline='\n' argument",
r13-4603-gb045179973161115c7ea029b2788f5156fc55cda, added support CR
on a line, but that broke support for older unidiff.PatchSet.
This patch uses a fallback for git_email.py (drop argument) if not
available (TypeError exception) but keeps using it in test_email.py
unconditionally.
contrib/ChangeLog:
* gcc-changelog/git_email.py (GitEmail:__init__): Support older
unidiff.PatchSet that do not have a newline= argument
of from_filename.
|
|
There's quite special code in copy_bb that handles inline substitution
of a non-invariant address in place of an invariant one that's
now handled by more generic handling of this case in remap_gimple_op_r
so this removes the special casing that happens in a hot path, providing
a small speedup.
PR middle-end/108086
* tree-inline.cc (copy_bb): Remove handling of (foo *)&this->m
substitution which is done in remap_gimple_op_r via
re-gimplifying.
|
|
[PR106751]
The RTL loop passes only request simple preheaders, but don't require
fallthru preheaders, while move_invariant_reg apparently assumes the
latter, that it can just append instruction(s) to the end of the preheader
basic block.
The following patch fixes that by splitting the preheader edge if
the preheader bb ends with a JUMP_INSN (asm goto in this case).
Without that we get control flow in the middle of a bb.
2022-12-16 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/106751
* loop-invariant.cc (move_invariant_reg): If preheader bb ends
with a JUMP_INSN, split the preheader edge and emit invariants
into the new preheader basic block.
* gcc.c-torture/compile/pr106751.c: New test.
|
|
There's another round of redundant operand scanning in
remap_gimple_stmt. The following removes this and also improves
one special-case to call a cheaper inline function.
PR middle-end/108086
* tree-inline.cc (remap_gimple_stmt): Add stmts to the
sequence without updating them. Simplify x == x detection.
|
|
Commit r13-4716-ge205ec03f0794aeac3e8a89e947c12624d5a274e accidentally
included a testcase of another patch that is pending review:
https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608401.html
libgomp/
PR libfortran/108056
* testsuite/libgomp.fortran/allocate-4.f90: Remove
accidentally added file.
|
|
We usually use only one "_" but not two "__" as prefix in intrin.
This patch aims to fix the intrin name for CMPccXADD.
gcc/ChangeLog:
* config/i386/cmpccxaddintrin.h
(__cmpccxadd_epi32): Rename to _cmpccxadd_epi32.
(__cmpccxadd_epi64): Rename to _cmpccxadd_epi64.
gcc/testsuite/ChangeLog:
* gcc.target/i386/cmpccxadd-1.c: Fix intrin name.
* gcc.target/i386/cmpccxadd-2.c: Ditto.
|
|
|
|
There's a curious corner case with variadic member using-decls: the
terminal name can also contain a parameter pack, and only through naming
a conversion function, e.g.
using A<Ts>::operator Ts...;
We currently only handle parameter packs appearing in the qualifying
scope of a variadic using-decl; this patch adds support for the above
case as well, representing such a using-decl via two pack expansions,
one for the qualifying scope and one for the terminal name (despite
logically there being just one). Then at instantiation time we manually
merge them.
PR c++/102104
PR c++/108090
gcc/cp/ChangeLog:
* error.cc (dump_decl) <case USING_DECL>: Look through a
pack expansion in the name as well.
* parser.cc (cp_parser_using_declaration): Handle a parameter
pack appearing in the terminal name of a variadic using-decl.
* pt.cc (tsubst_decl) <case USING_DECL>: Likewise. Combine the
handling of variadic and non-variadic using-decls.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/using-variadic1.C: New test.
* g++.dg/cpp1z/using-variadic1a.C: New test.
* g++.dg/cpp1z/using-variadic1b.C: New test.
* g++.dg/cpp1z/using-variadic1c.C: New test.
* g++.dg/cpp1z/using-variadic2.C: New test.
* g++.dg/cpp1z/using-variadic3.C: New test.
|
|
gcc/cp/ChangeLog:
* init.cc (build_vec_init): Rename "flags" to "cleanup_flags"
to distinguish from LOOKUP_*.
|
|
This fixes contract-checked extern "C" functions.
gcc/cp/ChangeLog:
* mangle.cc (write_encoding): Move contract pre/post function
mangling from here...
(write_mangled_name): ... to here, and make it happen always.
gcc/testsuite/ChangeLog:
* g++.dg/contracts/contracts-externC.C: New test.
|
|
Here when parsing the class-scope auto constrained by a qualified
concept-id, we first tentatively parse the overall member-declaration as
a deprecated access-declaration, during which we parse C<int> as a
standalone TEMPLATE_ID_EXPR (separate from the auto) and end up emitting
the stray error
concepts-placeholder11.C:9:6: error: wrong number of template arguments (1, should be 2)
9 | N::C<int> auto f() { return 0; }
| ^~~~~~
concepts-placeholder11.C:5:34: note: provided for ‘template<class, class> concept N::C’
5 | template<class, class> concept C = true;
| ^
from build_concept_id called from cp_parser_template_id_expr.
We could fix this by adding a complain parameter to build_concept_id and
passing tf_none when parsing tentatively. However, it seems this can
also be fixed in a more general way that might benefit non-concepts
code: when tentatively parsing an access-declaration, abort the parse
early if the qualifying scope isn't possibly a class or enumeration
type, so that we avoid parsing C<int> as a TEMPLATE_ID_EXPR here in the
first place. This patch takes this latter approach.
PR c++/107188
gcc/cp/ChangeLog:
* parser.cc (cp_parser_using_declaration): Give up early if the
scope of an access-declaration isn't possibly a class type.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-placeholder11.C: New test.
|