Commit Graph

190203 Commits

Author SHA1 Message Date
Marek Polacek 066b3258bb c++: Add fixed test [PR93614]
This was fixed by r11-86.

	PR c++/93614

gcc/testsuite/ChangeLog:

	* g++.dg/template/lookup18.C: New test.
2021-12-04 15:29:46 -05:00
Tobias Burnus 689407ef91 Fortran/OpenMP: Support most of 5.1 atomic extensions
Implements moste of OpenMP 5.1 atomic extensions,
except that 'compare' is parsed but rejected during
resolution. (As the trans-openmp.c handling is missing.)

gcc/fortran/ChangeLog:

	* dump-parse-tree.c (show_omp_clauses): Handle
	weak/compare/fail clause.
	* gfortran.h (gfc_omp_clauses): Add weak, compare, fail.
	* openmp.c (enum omp_mask1, gfc_match_omp_clauses,
	OMP_ATOMIC_CLAUSES): Update for new clauses.
	(gfc_match_omp_atomic): Update for 5.1 atomic changes.
	(is_conversion): Support widening in one go.
	(is_scalar_intrinsic_expr): New.
	(resolve_omp_atomic): Update for 5.1 atomic changes.
	* parse.c (parse_omp_oacc_atomic): Update for compare.
	* resolve.c (gfc_resolve_blocks): Update asserts.
	* trans-openmp.c (gfc_trans_omp_atomic): Handle new clauses.

gcc/testsuite/ChangeLog:

	* gfortran.dg/gomp/atomic-2.f90: Move now supported code to ...
	* gfortran.dg/gomp/atomic.f90: here.
	* gfortran.dg/gomp/atomic-10.f90: New test.
	* gfortran.dg/gomp/atomic-12.f90: New test.
	* gfortran.dg/gomp/atomic-15.f90: New test.
	* gfortran.dg/gomp/atomic-16.f90: New test.
	* gfortran.dg/gomp/atomic-17.f90: New test.
	* gfortran.dg/gomp/atomic-18.f90: New test.
	* gfortran.dg/gomp/atomic-19.f90: New test.
	* gfortran.dg/gomp/atomic-20.f90: New test.
	* gfortran.dg/gomp/atomic-22.f90: New test.
	* gfortran.dg/gomp/atomic-24.f90: New test.
	* gfortran.dg/gomp/atomic-25.f90: New test.
	* gfortran.dg/gomp/atomic-26.f90: New test.

libgomp/ChangeLog

	* libgomp.texi (OpenMP 5.1): Update status.
2021-12-04 19:43:46 +01:00
Jonathan Wakely 87710ec7b2 libstdc++: Initialize member in std::match_results [PR103549]
This fixes a -Wuninitialized warning for std::cmatch m1, m2; m1=m2;

Also name the template parameters in the forward declaration, to get rid
of the <template-parameter-1-1> noise in diagnostics.

libstdc++-v3/ChangeLog:

	PR libstdc++/103549
	* include/bits/regex.h (match_results): Give names to template
	parameters in first declaration.
	(match_results::_M_begin): Add default member-initializer.
2021-12-04 15:55:01 +00:00
Tobias Burnus b09af56214 libgomp.texi: Update OMP_PLACES
libgomp/ChangeLog:

	* libgomp.texi (OMP_PLACES): Extend description for OMP 5.1 changes.
2021-12-04 13:28:03 +01:00
Jakub Jelinek c060e5c49c i386, ipa-modref: Comment spelling fix
This patch fixes spelling of prefer (misspelled as preffer).

2021-12-04  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY): Fix
	comment typo, Preffer -> prefer.
	* ipa-modref-tree.c (modref_access_node::closer_pair_p): Likewise.
2021-12-04 11:09:33 +01:00
Jakub Jelinek c57c910c94 c++: Allow indeterminate unsigned char or std::byte in bit_cast - P1272R4
P1272R4 has added to the std::byteswap new stuff to me quite unrelated
clarification for std::bit_cast.
The patch treats it as DR, applying to all languages.
We no longer diagnose if padding bits are stored into unsigned char
or std::byte result, fields or bitfields, instead arrange for that result,
those fields or bitfields to get indeterminate value (empty
CONSTRUCTOR with CONSTRUCTOR_NO_ZEROING or just leaving the member's
initializer out and setting CONSTRUCTOR_NO_ZEROING on parent).

We still have a bug that we don't diagnose in lots of places lvalue-to-rvalue
conversions of indeterminate values or class objects with some indeterminate
members.

2021-12-04  Jakub Jelinek <jakub@redhat.com>

	* cp-tree.h (is_byte_access_type_not_plain_char): Declare.
	* tree.c (is_byte_access_type_not_plain_char): New function.
	* constexpr.c (clear_uchar_or_std_byte_in_mask): New function.
	(cxx_eval_bit_cast): Don't error about padding bits if target
	type is unsigned char or std::byte, instead return no clearing
	ctor.  Use clear_uchar_or_std_byte_in_mask.

	* g++.dg/cpp2a/bit-cast11.C: New test.
	* g++.dg/cpp2a/bit-cast12.C: New test.
	* g++.dg/cpp2a/bit-cast13.C: New test.
	* g++.dg/cpp2a/bit-cast14.C: New test.
2021-12-04 11:02:15 +01:00
Jakub Jelinek 55dfce4d5c libcpp: Fix up handling of deferred pragmas [PR102432]
The https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557903.html
change broke the following testcases.  The problem is when a pragma
namespace allows expansion (i.e. p->is_nspace && p->allow_expansion),
e.g. the omp or acc namespaces do, then when parsing the second pragma
token we do it with pfile->state.in_directive set,
pfile->state.prevent_expansion clear and pfile->state.in_deferred_pragma
clear (the last one because we don't know yet if it will be a deferred
pragma or not).  If the pragma line only contains a single name
and newline after it, and there exists a function-like macro with the
same name, the preprocessor needs to peek in funlike_invocation_p
the next token whether it isn't ( but in this case it will see a newline.
As pfile->state.in_directive is set, we don't read anything after the
newline, pfile->buffer->need_line is set and CPP_EOF is lexed, which
funlike_invocation_p doesn't push back.  Because name is a function-like
macro and on the pragma line there is no ( after the name, it isn't
expanded, and control flow returns to do_pragma.  If name is valid
deferred pragma, we set pfile->state.in_deferred_pragma (and really
need it set so that e.g. end_directive later on doesn't eat all the
tokens from the pragma line).

Before Nathan's change (which unfortunately didn't contain rationale
on why it is better to do it like that), this wasn't a problem,
next _cpp_lex_direct called when we want next token would return
CPP_PRAGMA_EOF when it saw buffer->need_line, which would turn off
pfile->state.in_deferred_pragma and following get token would already
read the next line.  But Nathan's patch replaced it with an assertion
failure that now triggers and CPP_PRAGMA_EOL is done only when lexing
the '\n'.  Except for this special case that works fine, but in
this case it doesn't because when peeking the token we still didn't know
that it will be a deferred pragma.
I've tried to fix that up in do_pragma by detecting this and pushing
CPP_PRAGMA_EOL as lookahead, but that doesn't work because end_directive
still needs to see pfile->state.in_deferred_pragma set.

So, this patch affectively reverts part of Nathan's change, CPP_PRAGMA_EOL
addition isn't done only when parsing the '\n', but is now done in both
places, in the first one instead of the assertion failure.

2021-12-04  Jakub Jelinek  <jakub@redhat.com>

	PR preprocessor/102432
	* lex.c (_cpp_lex_direct): If buffer->need_line while
	pfile->state.in_deferred_pragma, return CPP_PRAGMA_EOL token instead
	of assertion failure.

	* c-c++-common/gomp/pr102432.c: New test.
	* c-c++-common/goacc/pr102432.c: New test.
2021-12-04 11:00:09 +01:00
Alexandre Oliva daca416fc2 [PR103028] test ifcvt trap_if seq more strictly after reload
When -fif-conversion2 is enabled, we attempt to replace conditional
branches around unconditional traps with conditional traps.  That
canonicalizes compares, which may change an immediate that barely fits
into one that doesn't.

The compare for the trap is first checked using the predicates of
cbranch predicates, and then, compare and conditional trap insns are
emitted and recognized.

In the failing s390x testcase, i <=u 0xffff_ffff is canonicalized into
i <u 0x1_0000_0000, and the latter immediate doesn't fit.  The insn
predicates (both cbranch and cmpdi_ccu) happily accept it, since the
register allocator has no trouble getting them into registers.  The
problem is that ifcvt2 runs after reload, so we recognize the compare
insn successfully, but later on we barf when we find that none of the
constraints fit.

This patch arranges for the trap_if-issuing bits in ifcvt to validate
post-reload insns using a stricter test that also checks that operands
fit the constraints.


for  gcc/ChangeLog

	PR rtl-optimization/103028
	* ifcvt.c (find_cond_trap): Validate new insns more strictly
	after reload.

for  gcc/testsuite/ChangeLog

	PR rtl-optimization/103028
	* gcc.dg/pr103028.c: New.
2021-12-04 00:17:16 -03:00
David Edelsohn e096e2cfe9 testsuite: powerpc/vec_reve_1.c requires VSX.
vector long long int and vector double require VSX not just Altivec.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/vec_reve_1.c: Require VSX.
2021-12-03 20:11:59 -05:00
GCC Administrator 03a9bd059b Daily bump. 2021-12-04 00:16:46 +00:00
Jonathan Wakely bf548ce3e6 libstdc++: Simplify emplace member functions in _Rb_tree
This introduces a new RAII type to simplify the emplace members which
currently use try-catch blocks to deallocate a node if an exception is
thrown by the comparisons done during insertion. The new type is created
on the stack and manages the allocation of a new node and deallocates it
in the destructor if it wasn't inserted into the tree. It also provides
helper functions for doing the insertion, releasing ownership of the
node to the tree.

Also, we don't need to use long qualified names if we put the return
type after the nested-name-specifier.

libstdc++-v3/ChangeLog:

	* include/bits/stl_tree.h (_Rb_tree::_Auto_node): Define new
	RAII helper for creating and inserting new nodes.
	(_Rb_tree::_M_insert_node): Use trailing-return-type to simplify
	out-of-line definition.
	(_Rb_tree::_M_insert_lower_node): Likewise.
	(_Rb_tree::_M_insert_equal_lower_node): Likewise.
	(_Rb_tree::_M_emplace_unique): Likewise. Use _Auto_node.
	(_Rb_tree::_M_emplace_equal): Likewise.
	(_Rb_tree::_M_emplace_hint_unique): Likewise.
	(_Rb_tree::_M_emplace_hint_equal): Likewise.
2021-12-03 22:52:27 +00:00
Jason Merrill f78eaffd15 c++: avoid redundant scope in diagnostics
We can make some function signatures shorter to print by omitting redundant
nested-name-specifiers in the rest of the declarator.

gcc/cp/ChangeLog:

	* error.c (current_dump_scope): New variable.
	(dump_scope): Check it.
	(dump_function_decl): Set it.

gcc/testsuite/ChangeLog:

	* g++.dg/diagnostic/scope1.C: New test.
2021-12-03 17:21:12 -05:00
Jonathan Wakely 7bfe82e5a8 Fix typos in libstdc++-v3/ChangeLog 2021-12-03 21:34:18 +00:00
Martin Liska cff7879a38 rs6000: Fix up flag_shrink_wrap handling in presence of -mrop-protect [PR101324]
PR101324 shows a problem in disabling shrink-wrapping when using -mrop-protect
when there is a attribute optimize/pragma.  The fix envolves moving the handling
of flag_shrink_wrap so it gets re-disbled when we change or add options.

2021-12-03  Martin Liska  <mliska@suse.cz>

gcc/
	PR target/101324
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Move the
	disabling of shrink-wrapping when using -mrop-protect from here...
	(rs6000_override_options_after_change): ...to here.

2021-12-03  Peter Bergner  <bergner@linux.ibm.com>

gcc/testsuite/
	PR target/101324
	* gcc.target/powerpc/pr101324.c: New test.
2021-12-03 14:32:13 -06:00
Peter Bergner d81722ee16 rs6000: testsuite: Add rop_ok effective-target function
This patch adds a new effective-target function that tests whether
it is safe to emit the ROP-protect instructions and updates the
ROP test cases to use it.

2021-12-03  Peter Bergner  <bergner@linux.ibm.com>

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_rop_ok): New function.
	* gcc.target/powerpc/rop-1.c: Use it.
	* gcc.target/powerpc/rop-2.c: Likewise.
	* gcc.target/powerpc/rop-3.c: Likewise.
	* gcc.target/powerpc/rop-4.c: Likewise.
	* gcc.target/powerpc/rop-5.c: Likewise.
2021-12-03 14:32:13 -06:00
Harald Anlauf f46d32dd29 Fortran: improve checking of array specifications
gcc/fortran/ChangeLog:

	PR fortran/103505
	* array.c (match_array_element_spec): Try to simplify array
	element specifications to improve early checking.
	* expr.c (gfc_try_simplify_expr): New.  Try simplification of an
	expression via gfc_simplify_expr.  When an error occurs, roll
	back.
	* gfortran.h (gfc_try_simplify_expr): Declare it.

gcc/testsuite/ChangeLog:

	PR fortran/103505
	* gfortran.dg/pr103505.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
2021-12-03 21:07:55 +01:00
Marek Polacek abd7712f91 c++: Fix for decltype(auto) and parenthesized expr [PR103403]
In r11-4758, I tried to fix this problem:

  int &&i = 0;
  decltype(auto) j = i; // should behave like int &&j = i; error

wherein do_auto_deduction was getting confused with a REFERENCE_REF_P
and it didn't realize its operand was a name, not an expression, and
deduced the wrong type.

Unfortunately that fix broke this:

  int&& r = 1;
  decltype(auto) rr = (r);

where 'rr' should be 'int &' since '(r)' is an expression, not a name.  But
because I stripped the INDIRECT_REF with the r11-4758 change, we deduced
'rr's type as if decltype had gotten a name, resulting in 'int &&'.

I suspect I thought that the REF_PARENTHESIZED_P check when setting
'bool id' in do_auto_deduction would handle the (r) case, but that's not
the case; while the documentation for REF_PARENTHESIZED_P specifically says
it can be set in INDIRECT_REF, we don't actually do so.

This patch sets REF_PARENTHESIZED_P even on REFERENCE_REF_P, so that
do_auto_deduction can use it.

It also removes code in maybe_undo_parenthesized_ref that I think is
dead -- and we don't hit it while running dg.exp.  To adduce more data,
it also looks dead here:
https://splichal.eu/lcov/gcc/cp/semantics.c.gcov.html
(It's dead since r9-1417.)

Also add a fixed test for c++/81176.

	PR c++/103403

gcc/cp/ChangeLog:

	* cp-gimplify.c (cp_fold): Don't recurse if maybe_undo_parenthesized_ref
	doesn't change its argument.
	* pt.c (do_auto_deduction): Don't strip REFERENCE_REF_P trees if they
	are REF_PARENTHESIZED_P.  Use stripped_init when checking for
	id-expression.
	* semantics.c (force_paren_expr): Set REF_PARENTHESIZED_P on
	REFERENCE_REF_P trees too.
	(maybe_undo_parenthesized_ref): Remove dead code.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1y/decltype-auto2.C: New test.
	* g++.dg/cpp1y/decltype-auto3.C: New test.
	* g++.dg/cpp1y/decltype-auto4.C: New test.
	* g++.dg/cpp1z/decomp-decltype1.C: New test.
2021-12-03 14:00:11 -05:00
H.J. Lu 654cd743c8 x86: Add -mmove-max=bits and -mstore-max=bits
Add -mmove-max=bits and -mstore-max=bits to enable 256-bit/512-bit move
and store, independent of -mprefer-vector-width=bits:

1. Add X86_TUNE_AVX512_MOVE_BY_PIECES and X86_TUNE_AVX512_STORE_BY_PIECES
which are enabled for Intel Sapphire Rapids processor.
2. Add -mmove-max=bits to set the maximum number of bits can be moved from
memory to memory efficiently.  The default value is derived from
X86_TUNE_AVX512_MOVE_BY_PIECES, X86_TUNE_AVX256_MOVE_BY_PIECES, and the
preferred vector width.
3. Add -mstore-max=bits to set the maximum number of bits can be stored to
memory efficiently.  The default value is derived from
X86_TUNE_AVX512_STORE_BY_PIECES, X86_TUNE_AVX256_STORE_BY_PIECES and the
preferred vector width.

gcc/

	PR target/103269
	* config/i386/i386-expand.c (ix86_expand_builtin): Pass PVW_NONE
	and PVW_NONE to ix86_target_string.
	* config/i386/i386-options.c (ix86_target_string): Add arguments
	for move_max and store_max.
	(ix86_target_string::add_vector_width): New lambda.
	(ix86_debug_options): Pass ix86_move_max and ix86_store_max to
	ix86_target_string.
	(ix86_function_specific_print): Pass ptr->x_ix86_move_max and
	ptr->x_ix86_store_max to ix86_target_string.
	(ix86_valid_target_attribute_tree): Handle x_ix86_move_max and
	x_ix86_store_max.
	(ix86_option_override_internal): Set the default x_ix86_move_max
	and x_ix86_store_max.
	* config/i386/i386-options.h (ix86_target_string): Add
	prefer_vector_width and prefer_vector_width.
	* config/i386/i386.h (TARGET_AVX256_MOVE_BY_PIECES): Removed.
	(TARGET_AVX256_STORE_BY_PIECES): Likewise.
	(MOVE_MAX): Use 64 if ix86_move_max or ix86_store_max ==
	PVW_AVX512.  Use 32 if ix86_move_max or ix86_store_max >=
	PVW_AVX256.
	(STORE_MAX_PIECES): Use 64 if ix86_store_max == PVW_AVX512.
	Use 32 if ix86_store_max >= PVW_AVX256.
	* config/i386/i386.opt: Add -mmove-max=bits and -mstore-max=bits.
	* config/i386/x86-tune.def (X86_TUNE_AVX512_MOVE_BY_PIECES): New.
	(X86_TUNE_AVX512_STORE_BY_PIECES): Likewise.
	* doc/invoke.texi: Document -mmove-max=bits and -mstore-max=bits.

gcc/testsuite/

	PR target/103269
	* gcc.target/i386/pieces-memcpy-17.c: New test.
	* gcc.target/i386/pieces-memcpy-18.c: Likewise.
	* gcc.target/i386/pieces-memcpy-19.c: Likewise.
	* gcc.target/i386/pieces-memcpy-20.c: Likewise.
	* gcc.target/i386/pieces-memcpy-21.c: Likewise.
	* gcc.target/i386/pieces-memset-45.c: Likewise.
	* gcc.target/i386/pieces-memset-46.c: Likewise.
	* gcc.target/i386/pieces-memset-47.c: Likewise.
	* gcc.target/i386/pieces-memset-48.c: Likewise.
	* gcc.target/i386/pieces-memset-49.c: Likewise.
2021-12-03 09:57:06 -08:00
Bill Schmidt 987baa7444 rs6000: Fix use of wrong enum for built-in function code
I discovered this bug while working on patches to remove the old built-ins
infrastructure.  I missed a spot in converting from the rs6000_builtins enum to
the rs6000_gen_builtins_enum.  This fixes it.  The fix is technically not right
if new_builtins_are_enabled were to be set to zero, but we're not going to do
that anymore, and the remnants of that code will be removed shortly.

2021-12-02  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
	* config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Fix builtin
	identifiers.
2021-12-03 11:56:08 -06:00
H.J. Lu 37fbf9175b x86: Scan leal in PR target/83782 tests for x32
Update PR target/83782 tests to scan leal for x32 to fix:

FAIL: gcc.target/i386/pr83782-1.c scan-assembler leaq[ \\t]foo\\(%rip\\),[ \\t]%rax
FAIL: gcc.target/i386/pr83782-2.c scan-assembler leaq[ \\t]foo\\(%rip\\),[ \\t]%rax

	PR target/83782
	* gcc.target/i386/pr83782-1.c: Also scan leal x32.
	* gcc.target/i386/pr83782-2.c: Likewise.
2021-12-03 09:00:54 -08:00
SiYu Wu 0962bff477 RISC-V: Add implied defines of Zk, Zkn and Zks
gcc/ChangeLog:

2021-11-22  SiYu Wu  <siyu@isrc.iscas.ac.cn>

	* common/config/riscv/riscv-common.c (riscv_implied_info):
	Add K-ext related entry.
	(riscv_supported_std_ext): Add 'k'.
	* config/riscv/arch-canonicalize (CANONICAL_ORDER): Add 'k'.
	(IMPLIED_EXT): Add K-ext related entry.
2021-12-04 00:10:35 +08:00
SiYu Wu add31efdc7 RISC-V: Add option defines for Scalar Cryptography
gcc/ChangeLog:

2021-11-21  SiYu Wu  <siyu@isrc.iscas.ac.cn>

	* common/config/riscv/riscv-common.c (riscv_ext_version_table):
	Add zbk* and zk*.
	* config/riscv/riscv-opts.h (MASK_ZBKB): New.
	(MASK_ZBKC): Ditto.
	(MASK_ZBKX): Ditto.
	(MASK_ZKNE): Ditto.
	(MASK_ZKND): Ditto.
	(MASK_ZKNH): Ditto.
	(MASK_ZKR): Ditto.
	(MASK_ZKSED): Ditto.
	(MASK_ZKSH): Ditto.
	(MASK_ZKT): Ditto.
	(TARGET_ZBKB): Ditto.
	(TARGET_ZBKC): Ditto.
	(TARGET_ZBKX): Ditto.
	(TARGET_ZKNE): Ditto.
	(TARGET_ZKND): Ditto.
	(TARGET_ZKNH): Ditto.
	(TARGET_ZKR): Ditto.
	(TARGET_ZKSED): Ditto.
	(TARGET_ZKSH): Ditto.
	(TARGET_ZKT): Ditto.
	* config/riscv/riscv.opt (riscv_zk_subext): New.
2021-12-04 00:10:26 +08:00
Tamar Christina 06f2e7d49f sve: combine nested if predicates
The following example

void f5(float * restrict z0, float * restrict z1, float *restrict x,
	float * restrict y, float c, int n)
{
    for (int i = 0; i < n; i++) {
        float a = x[i];
        float b = y[i];
        if (a > b) {
            z0[i] = a + b;
            if (a > c) {
                z1[i] = a - b;
            }
        }
    }
}

generates currently:

        ptrue   p3.b, all
        ld1w    z1.s, p1/z, [x2, x5, lsl 2]
        ld1w    z2.s, p1/z, [x3, x5, lsl 2]
        fcmgt   p0.s, p3/z, z1.s, z0.s
        fcmgt   p2.s, p1/z, z1.s, z2.s
        fcmgt   p0.s, p0/z, z1.s, z2.s
        and     p0.b, p0/z, p1.b, p1.b

The conditions for a > b and a > c become separate comparisons.

After this patch we generate:

        ld1w    z1.s, p0/z, [x2, x5, lsl 2]
        ld1w    z2.s, p0/z, [x3, x5, lsl 2]
        fcmgt   p1.s, p0/z, z1.s, z2.s
        fcmgt   p1.s, p1/z, z1.s, z0.s

Where the condition a > b && a > c are folded by using the predicate result of
the previous compare and thus allows the removal of one of the compares.

When never a mask is being generated from an BIT_AND we mask the operands of
the and instead and then just AND the result.

This allows us to be able to CSE the masks and generate the right combination.
However because re-assoc will try to re-order the masks in the & we have to now
perform a small local CSE on the vectorized loop is vectorization is successful.

Note: This patch series is working incrementally towards generating the most
      efficient code for this and other loops in small steps.

gcc/ChangeLog:

	* tree-vect-stmts.c (prepare_load_store_mask): Rename to...
	(prepare_vec_mask): ...This and record operations that have already been
	masked.
	(vectorizable_call): Use it.
	(vectorizable_operation): Likewise.
	(vectorizable_store): Likewise.
	(vectorizable_load): Likewise.
	* tree-vectorizer.h (class _loop_vec_info): Add vec_cond_masked_set.
	(vec_cond_masked_set_type, tree_cond_mask_hash): New.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/sve/pred-combine-and.c: New test.
2021-12-03 15:25:44 +00:00
H.J. Lu f7854b9089 Add TARGET_IFUNC_REF_LOCAL_OK
1. On some targets, like PowerPC, reference to ifunc function resolver
must be non-local so that compiler will properly emit PLT call.  Add
TARGET_IFUNC_REF_LOCAL_OK to allow binding indirect function resolver
locally for targets which don't require special PLT call sequence.
2. Add ix86_call_use_plt_p to call local ifunc function resolvers via
PLT.

gcc/

	PR target/51469
	PR target/83782
	* target.def (ifunc_ref_local_ok): Add a target hook.
	* varasm.c (default_binds_local_p_3): Force indirect function
	resolver non-local only if targetm.ifunc_ref_local_ok returns
	false.
	* config/i386/i386-expand.c (ix86_expand_call): Call
	ix86_call_use_plt_p to check if PLT should be used.
	* config/i386/i386-protos.h (ix86_call_use_plt_p): New.
	* config/i386/i386.c (output_pic_addr_const): Call
	ix86_call_use_plt_p to check if "@PLT" is needed.
	(ix86_call_use_plt_p): New.
	(TARGET_IFUNC_REF_LOCAL_OK): New.
	* doc/tm.texi.in: Add TARGET_IFUNC_REF_LOCAL_OK.
	* doc/tm.texi: Regenerated.

gcc/testsuite/

	PR target/51469
	PR target/83782
	* gcc.target/i386/pr83782-1.c: New test.
	* gcc.target/i386/pr83782-2.c: Likewise.
2021-12-03 05:12:30 -08:00
Jakub Jelinek 97ffef3553 testsuite: Fix up pr103456.c testcase [PR103456]
ubsan.exp cycles through torture options, and that includes
-O2 -flto -fno-fat-lto-objects.  But with those options
tree dump scans don't work for post-IPA passes, for dg-do
compile tests nothing after IPA is done.  So we get an
unresolved testcase:
gcc.dg/ubsan/pr103456.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  : dump file does not exist
UNRESOLVED: gcc.dg/ubsan/pr103456.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects   scan-tree-dump-not objsz1 "maximum object size 0"

Fixed by adding -ffat-lto-objects so that we perform the post-IPA
passes.

2021-12-03  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/103456
	* gcc.dg/ubsan/pr103456.c: Add -ffat-lto-objects to dg-options.
2021-12-03 12:09:04 +01:00
Jakub Jelinek 7e71909af2 x86: Speed up target attribute handling by using a cache
The target attribute handling is very expensive and for the common case
from x86intrin.h where many functions get implicitly the same target
attribute, we can speed up compilation a lot by caching it.

The following patches both create a single entry cache, where they cache
for a particular target attribute argument list the resulting
DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_SPECIFIC_OPTIMIZATION
values from ix86_valid_target_attribute_p and use the cache if the
args are the same as last time and we start either from NULL values
of those, or from the recorded values for those from last time.

Compiling a simple:
 #include <x86intrin.h>

 int i;
testcase with ./cc1 -quiet -O2 -isystem include/ test.c
takes on my WS without the patches ~0.392s and with either of the
patches ~0.182s, i.e. roughly half the time as before.
For ./cc1plus -quiet -O2 -isystem include/ test.c
it is slightly worse, the speed up is from ~0.613s to ~0.403s.

The difference between the 2 patches is that the first one uses copy_list
while the second one uses a vec, so I think the second one has the advantage
of creating less GC garbage.
I've verified both patches achieve the same content of those
DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_SPECIFIC_OPTIMIZATION
nodes as before on x86intrin.h by doing debug_tree on those and comparing
the stderr from without these patches to with these patches.

2021-12-03  Jakub Jelinek  <jakub@redhat.com>

	* attribs.h (simple_cst_list_equal): Declare.
	* attribs.c (simple_cst_list_equal): No longer static.
	* config/i386/i386-options.c (target_attribute_cache): New variable.
	(ix86_valid_target_attribute_p): Cache DECL_FUNCTION_SPECIFIC_TARGET
	and DECL_FUNCTION_SPECIFIC_OPTIMIZATION based on args.
2021-12-03 11:07:44 +01:00
Jakub Jelinek fe7c3ecff1 pch: Add support for PCH for relocatable executables [PR71934]
So, if we want to make PCH work for PIEs, I'd say we can:
1) add a new GTY option, say callback, which would act like
   skip for non-PCH and for PCH would make us skip it but
   remember for address bias translation
2) drop the skip for tree_translation_unit_decl::language
3) change get_unnamed_section to have const char * as
   last argument instead of const void *, change
   unnamed_section::data also to const char * and update
   everything related to that
4) maybe add a host hook whether it is ok to support binaries
   changing addresses (the only thing I'm worried is if
   some host that uses function descriptors allocates them
   dynamically instead of having them somewhere in the
   executable)
5) maybe add a gengtype warning if it sees in GTY tracked
   structure a function pointer without that new callback
   option

Here is 1), 2), 3) implemented.

Note, on stdc++.h.gch/O2g.gch there are just those 10 relocations without
the second patch, with it a few more, but nothing huge.  And for non-PIEs
there isn't really any extra work on the load side except freading two scalar
values and fseek.

2021-12-03  Jakub Jelinek  <jakub@redhat.com>

	PR pch/71934
gcc/
	* ggc.h (gt_pch_note_callback): Declare.
	* gengtype.h (enum typekind): Add TYPE_CALLBACK.
	(callback_type): Declare.
	* gengtype.c (dbgprint_count_type_at): Handle TYPE_CALLBACK.
	(callback_type): New variable.
	(process_gc_options): Add CALLBACK argument, handle callback
	option.
	(set_gc_used_type): Adjust process_gc_options caller, if callback,
	set type to &callback_type.
	(output_mangled_typename): Handle TYPE_CALLBACK.
	(walk_type): Likewise.  Handle callback option.
	(write_types_process_field): Handle TYPE_CALLBACK.
	(write_types_local_user_process_field): Likewise.
	(write_types_local_process_field): Likewise.
	(write_root): Likewise.
	(dump_typekind): Likewise.
	(dump_type): Likewise.
	* gengtype-state.c (type_lineloc): Handle TYPE_CALLBACK.
	(state_writer::write_state_callback_type): New method.
	(state_writer::write_state_type): Handle TYPE_CALLBACK.
	(read_state_callback_type): New function.
	(read_state_type): Handle TYPE_CALLBACK.
	* ggc-common.c (callback_vec): New variable.
	(gt_pch_note_callback): New function.
	(gt_pch_save): Stream out gt_pch_save function address and relocation
	table.
	(gt_pch_restore): Stream in saved gt_pch_save function address and
	relocation table and apply relocations if needed.
	* doc/gty.texi (callback): Document new GTY option.
	* varasm.c (get_unnamed_section): Change callback argument's type and
	last argument's type from const void * to const char *.
	(output_section_asm_op): Change argument's type from const void *
	to const char *, remove unnecessary cast.
	* tree-core.h (struct tree_translation_unit_decl): Drop GTY((skip))
	from language member.
	* output.h (unnamed_section_callback): Change argument type from
	const void * to const char *.
	(struct unnamed_section): Use GTY((callback)) instead of GTY((skip))
	for callback member.  Change data member type from const void *
	to const char *.
	(struct noswitch_section): Use GTY((callback)) instead of GTY((skip))
	for callback member.
	(get_unnamed_section): Change callback argument's type and
	last argument's type from const void * to const char *.
	(output_section_asm_op): Change argument's type from const void *
	to const char *.
	* config/avr/avr.c (avr_output_progmem_section_asm_op): Likewise.
	Remove unneeded cast.
	* config/darwin.c (output_objc_section_asm_op): Change argument's type
	from const void * to const char *.
	* config/pa/pa.c (som_output_text_section_asm_op): Likewise.
	(som_output_comdat_data_section_asm_op): Likewise.
	* config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op):
	Likewise.
	(rs6000_xcoff_output_readonly_section_asm_op): Likewise.  Instead
	of dereferencing directive hardcode variable names and decide based on
	whether directive is NULL or not.
	(rs6000_xcoff_output_readwrite_section_asm_op): Change argument's type
	from const void * to const char *.
	(rs6000_xcoff_output_tls_section_asm_op): Likewise.  Instead
	of dereferencing directive hardcode variable names and decide based on
	whether directive is NULL or not.
	(rs6000_xcoff_output_toc_section_asm_op): Change argument's type
	from const void * to const char *.
	(rs6000_xcoff_asm_init_sections): Adjust get_unnamed_section callers.
gcc/c-family/
	* c-pch.c (struct c_pch_validity): Remove pch_init member.
	(pch_init): Don't initialize v.pch_init.
	(c_common_valid_pch): Don't warn and punt if .text addresses change.
libcpp/
	* include/line-map.h (class line_maps): Add GTY((callback)) to
	reallocator and round_alloc_size members.
2021-12-03 11:03:30 +01:00
Chung-Lin Tang 6262e3a22b fortran: Fix setting of array lower bound for named arrays
This patch fixes a case of setting array low-bounds, found for particular uses
of SOURCE=/MOLD=. This adjusts the relevant part in gfc_trans_allocate() to
set e3_has_nodescriptor only for non-named arrays.

2021-12-03  Tobias Burnus  <tobias@codesourcery.com>

gcc/fortran/ChangeLog:

	* trans-stmt.c (gfc_trans_allocate): Set e3_has_nodescriptor to true
	only for non-named arrays.

gcc/testsuite/ChangeLog:

	* gfortran.dg/allocate_with_source_26.f90: Adjust testcase.
	* gfortran.dg/allocate_with_mold_4.f90: New testcase.
2021-12-03 17:27:17 +08:00
Thomas Schwinge 31c200c6e1 Make sure that we get unique test names if several DejaGnu directives refer to the same line [PR102735]
gcc/testsuite/
	PR testsuite/102735
	* lib/gcc-dg.exp (process-message): Make sure that we get unique
	test names.
2021-12-03 09:24:48 +01:00
Andrew Pinski d828234543 [Committed] New testcase for C++/71792, bitfields and auto
This testcase used to fail before GCC 6.4.0 due to the wrong
type being used for auto when used with bitfields, the C++
front-end was using the "bitfield" type rather than the
underlaying type.

Committed the testcase after a quick check.

	PR c++/71792

gcc/testsuite/ChangeLog:

	* g++.dg/torture/pr71792.C: New test.
2021-12-03 08:17:03 +00:00
Richard Purdie 66e157188b gcc: Fix "argument list too long" from install-plugins
When building in longer build paths (200+ characters), the
"echo $(PLUGIN_HEADERS)" from the install-plugins target would cause an
"argument list too long error" on some systems.

Avoid this by calling make's sort function on the list which removes
duplicates and stops the overflow from reaching the echo command.
The original sort is left to handle the the .h and .def files.

2021-10-26 Richard Purdie <richard.purdie@linuxfoundation.org>

gcc/ChangeLog:

	* Makefile.in: Fix "argument list too long" from install-plugins.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-02 22:00:04 -05:00
Matt Jacobson 711084c945 build: Implement --with-multilib-list for avr target
gcc

	* config.gcc: For the AVR target, populate TM_MULTILIB_CONFIG.
	* config/avr/genmultilib.awk: Add ability to filter generated multilib
	list.
	* config/avr/t-avr: Pass TM_MULTILIB_CONFIG to genmultilib.awk.
	* configure.ac: Update help string for --with-multilib-list.
	* configure: Regenerate.
2021-12-02 21:53:13 -05:00
GCC Administrator ea6ef320b0 Daily bump. 2021-12-03 00:17:04 +00:00
Pekka Seppänen c841dc0a4d Adjust CPP_FOR_BUILD
Hi.

CPP/CPPFLAGS were changed by commit 84401ce5fb.  That commit uses CPP as a default for CPP_FOR_BUILD.  Unless CPP is defined, GNU make defaults CPP as `$(CC) -E'.  Given the context, this is now incorrect, since CC_FOR_BUILD should be used.

Fixes PR103011.

-- Pekka

gcc/Changelog:

	* configure: Regenerate.
	* configure.ac: For CPP_FOR_BUILD use $(CC_FOR_BUILD) -E instead of
	$(CPP).
2021-12-02 15:59:37 -05:00
Ilya Lipnitskiy 25abbb9249 [PATCH v2] configure: define TARGET_LIBC_GNUSTACK on musl
musl only uses PT_GNU_STACK to set default thread stack size and has no
executable stack support[0], so there is no reason not to emit the
.note.GNU-stack section on musl builds.

[0]: https://lore.kernel.org/all/20190423192534.GN23599@brightrain.aerifal.cx/T/#u

gcc

	* configure: Regenerate.
	* configure.ac: Define TARGET_LIBC_GNUSTACK on musl.
2021-12-02 15:47:11 -05:00
Iain Sandoe 22a9824093 Darwin: Rewrite host PCH support [PR 55610].
We need to revise the PCH memory allocation scheme to enable
support for PIE on aarch64.  The rewrite uses a similar scheme
to the one used on Linux.

We attempt to identify VM segments for each arch/OS version that
are always available to the compiler (note this is not general,
it only needs to work for the cc1* exes).

If we cannot find the preferred segment we fall back to allowing
the kernel to supply one - this is more likely to fail when the
PCH read-in occurs (but that is trapped).

In doing this we obviate the need to unmap any part of the
compiler __DATA segment - thus fixing PR 55610.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/ChangeLog:

	PR target/55610
	* config/host-darwin.c (TRY_EMPTY_VM_SPACE,
	SAFE_ALLOC_SIZE): New.
	(darwin_gt_pch_get_address): Rewrite to use nominated
	memory segments rather than part of the compiler __DATA
	segment.
	(darwin_gt_pch_use_address): Likewise.
2021-12-02 19:44:44 +00:00
Gerald Pfeifer 2835977f84 doc: Remove references to FreeBSD 1 and 2
FreeBSD 1 and FreeBSD 2, both still a.out, have been end of life for
over two decades and GCC has not been supporting them for ages, too,
so simply remove references.

gcc:
	* doc/install.texi (*-*-freebsd*): Remove references to
	FreeBSD 1 and FreeBSD 2.
2021-12-02 21:10:44 +02:00
David Malcolm 38a0ee2649 analyzer: add regression test for leak false +ve [PR103526]
gcc/testsuite/ChangeLog:
	PR analyzer/103526
	* gcc.dg/analyzer/pr103526.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2021-12-02 14:05:31 -05:00
Vladimir N. Makarov cd47cd4b5e [PR103437] Make backup code for overflow conditional
Switch off long long variant overflow code by preprocessor if the
build compiler has __builtin_smul_overflow.

gcc/ChangeLog:
	PR rtl-optimization/103437
	* ira-color.c (setup_allocno_priorities): Switch off backup code
	for overflow if compiler has __builtin_smul_overflow.  Use <
	for comparison with -INT_MAX.
2021-12-02 12:39:05 -05:00
Jonathan Wakely acf4fe96f1 libstdc++: Allow exception classes to move fully-dynamic strings
The move constructor for the fully-dynamic std::basic_string was not
noexcept until recently, so the std::logic_error and std::runtime_error
move constructors were defined to make non-throwing copies of their
string members, instead of potentially-throwing moves.

Now that move construction is always noexecpt, the exception classes can
always move the string. The fully-dynamic string move assignment was
always noexcept, so I don't know why I special-cased the move assignment
operators of the exception classes. That can be changed too.

libstdc++-v3/ChangeLog:

	* src/c++11/cow-stdexcept.cc [_GLIBCXX_FULY_DYNAMIC_STRING]
	(logic_error, runtime_error): Remove custom definitions.
2021-12-02 16:53:13 +00:00
Jonathan Wakely e2e98f524f libstdc++: Remove broken std::allocator base classes [PR103340]
The bitmap_allocator, __mt_alloc and __pool_alloc extensions are no
longer suitable for use as the base class of std::allocator, because
they have not been updated to meet the C++20 requirements.  There is a
patch attached to PR 103340 which addresses that, but more work would be
needed to solve the linking errors that occur when the library is
configured to use them.

Using --enable-libstdcxx-allocator=bitmap wouldn't even bootstrap for
the past few years, and I can't find any gcc-testresults reports using
any of these allocators. This patch removes the configure option to use
these as the std::allocator base class. The allocators are still in the
tree and can be used directly, you just can't configure the library to
use one of them as the base class of std::allocator.

libstdc++-v3/ChangeLog:

	PR libstdc++/103340
	PR libstdc++/103400
	PR libstdc++/103381
	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Remove mt, bitmap
	and pool options.
	* configure: Regenerate.
	* config/allocator/bitmap_allocator_base.h: Removed.
	* config/allocator/mt_allocator_base.h: Removed.
	* config/allocator/pool_allocator_base.h: Removed.
	* doc/xml/manual/allocator.xml: Update.
	* doc/xml/manual/configure.xml: Update.
	* doc/xml/manual/evolution.xml: Document removal.
	* doc/xml/manual/mt_allocator.xml: Editorial tweaks.
	* doc/html/manual/*: Regenerate.
2021-12-02 16:46:28 +00:00
Jonathan Wakely b5a568683f libstdc++: Restore unconditional atomic load in COW std::string
The relaxed load is already optimal, checking the __single_threaded
global before doing a non-atomic load isn't an optimization.

libstdc++-v3/ChangeLog:

	* include/bits/cow_string.h (basic_string::_M_is_leaked()):
	Revert change to check __is_single_threaded() before using
	atomic load.
2021-12-02 16:46:28 +00:00
Bill Schmidt d08236359e rs6000: Enable new built-in support, with test suite and altivec.h changes
This patch enables the new built-in infastructure for the Power back end.
To avoid any patches causing regressions that would affect bisection, this is a
combined patch that also includes all the test suite changes and the necessary
modifications to altivec.h.  The patches included here are the following:

https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584638.html
https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578613.html
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584829.html
https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578614.html

The third of these four was broken up into multiple patches for review, but
effectively all pieces of it were accepted after an independent patch that
modified the error handling for overloaded builtins.

2021-12-02  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
	* config/rs6000/altivec.h: Delete a number of #defines that are	now
	superfluous.  Alphabetize.  Include rs6000-vecdefines.h.  Include some
	synonyms.
	* config/rs6000/rs6000-builtin-new.def (CMPB): Flag as no32bit.
	(BPERMD): Flag as 32bit (needing special handling for 32-bit).
	(UNPACK_TD): Return unsigned long long instead of unsigned long.
	(GET_TEXASR): Return unsigned long instead of unsigned long long.
	(GET_TEXASRU): Likewise.
	(GET_TFHAR): Likewise.
	(GET_TFIAR): Likewise.
	(SET_TEXASR): Pass unsigned long instead of unsigned long long.
	(SET_TEXASRU): Likewise.
	(SET_TFHAR): Likewise.
	(SET_TFIAR): Likewise.
	(TABORTDC): Likewise.
	(TABORTDCI): Likewise.
	* config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): Fix error
	handling for no32bit.  Add 32bit handling for RS6000_BIF_BPERMD.
	* config/rs6000/rs6000-gen-builtins.c (write_init_file): Initialize
	new_builtins_are_live to 1.

gcc/testsuite/
	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust expected error
	message.
	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-neg-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-neg-3.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise.
	* gcc.target/powerpc/byte-in-set-2.c: Likewise.
	* gcc.target/powerpc/cmpb-2.c: Likewise.
	* gcc.target/powerpc/cmpb-3.c: Likewise.
	* gcc.target/powerpc/cmpb32-2.c: Likewise.
	* gcc.target/powerpc/crypto-builtin-2.c: Likewise.
	* gcc.target/powerpc/fold-vec-splat-floatdouble.c: Remove invalid
	test and adjust xxpermdi count.
	* gcc.target/powerpc/fold-vec-splat-longlong.c: Remove invalid
	tests and adjust instruction counts.
	* gcc.target/powerpc/fold-vec-splat-misc-invalid.c: Adjust expected
	error messages.
	* gcc.target/powerpc/int_128bit-runnable.c: Adjust instruction counts.
	* gcc.target/powerpc/pr80315-1.c: Adjust expected error message.
	* gcc.target/powerpc/pr80315-2.c: Likewise.
	* gcc.target/powerpc/pr80315-3.c: Likewise.
	* gcc.target/powerpc/pr80315-4.c: Likewise.
	* gcc.target/powerpc/pr88100.c: Likewise.
	* gcc.target/powerpc/pragma_misc9.c: Likewise.
	* gcc.target/powerpc/pragma_power8.c: Undef _RS6000_VECDEFINES_H.
	* gcc.target/powerpc/pragma_power9.c: Likewise.
	* gcc.target/powerpc/test_fpscr_drn_builtin_error.c: Adjust expected
	error messages.
	* gcc.target/powerpc/test_fpscr_rn_builtin_error.c: Likewise.
	* gcc.target/powerpc/vec-gnb-2.c: Likewise.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-cmpnez-7.c: Likewise.
	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Likewise.
	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c: Likewise.
2021-12-02 10:40:14 -06:00
Eric Botcazou c9dd01314d [Ada] Add warning in comment about files copied from libgnat
gcc/ada/

	* gcc-interface/Make-lang.in (ADA_GENERATED_FILES): Add warning.
2021-12-02 16:26:32 +00:00
Marc Poulhiès 96d9ca7053 [Ada] Remove obsolete a-assert
gcc/ada/

	* gcc-interface/a-assert.ads, gcc-interface/a-assert.adb: Remove.
2021-12-02 16:26:32 +00:00
Eric Botcazou 31a6895f4c [Ada] Do not back-annotate maximum size for limited types
gcc/ada/

	* gcc-interface/decl.c (gnat_to_gnu_entity): Do not back-annotate a
	maximum size for the Esize of limited record and concurrent types.
2021-12-02 16:26:31 +00:00
Eric Botcazou 5a11ffadf5 [Ada] Fix packing for array component with discriminated part
gcc/ada/

	* gcc-interface/gigi.h (aggregate_type_contains_array_p): Delete.
	(type_has_variable_size): Declare.
	* gcc-interface/decl.c (adjust_packed): Return 0 only if the field
	type is an array with variable size.
	* gcc-interface/utils.c (aggregate_type_contains_array_p): Make
	static and remove SELF_REFERENTIAL parameter.
	(type_has_variable_size): Make public.
	(create_field_decl): Adjust call to aggregate_type_contains_array_p.
2021-12-02 16:26:31 +00:00
Justin Squirek 9e10b7002a [Ada] Invalid memory access on finalization of class-wide type
gcc/ada/

	* gcc-interface/decl.c (gnat_to_gnu_entity): Skip normal
	processing for Itypes that are E_Class_Wide_Subtype with
	Equivalent_Type set.
2021-12-02 16:26:30 +00:00
Eric Botcazou 298339effd [Ada] Fix oversight in minor cleanup
gcc/ada/

	* gcc-interface/trans.c (Call_to_gnu): Rename GNAT_NAME variable
	into GNAT_SUBPROG to avoid later shadowing.
2021-12-02 16:26:30 +00:00
Yannick Moy b5e57389c5 [Ada] Proof of System.Arith_32 for double arithmetic on 32bits
gcc/ada/

	* libgnat/s-arit32.adb: Add ghost instances and lemmas.
	(Scaled_Divide32): Add ghost code to prove. Minor code
	modification to return early in error when divisor is zero.
	* libgnat/s-arit32.ads: Add ghost instances and utilities.
	(Scaled_Divide32): Add contract.
2021-12-02 16:26:30 +00:00