Commit Graph

191931 Commits

Author SHA1 Message Date
Jonathan Wakely
4cb935cb69 libstdc++: Use visibility pragmas instead of attributes [PR104807]
The _GLIBCXX_PSEUDO_VISIBILITY macro isn't defined until after including
os_defines.h, so we can't use _GLIBCXX_VISIBILITY early in c++config.
Replace the uses of that macro with #pragma visibility push(default)
instead.

libstdc++-v3/ChangeLog:

	PR libstdc++/104807
	* include/bits/c++config (__terminate, __glibcxx_assert_fail):
	Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
	(__is_constant_evaluated): Add visibility pragma.
2022-03-07 15:10:29 +00:00
Martin Liska
111754595c opts: fix -gtoggle + optimize attribute
Note -fvar-tracking is enabled automatically with OPT_LEVELS_1_PLUS and
so we need to drop it if we are called from optimize attribute and the
option is unset.

	PR middle-end/104381

gcc/ChangeLog:

	* opts.cc (finish_options): If debug info is disabled
	(debug_info_level) and -fvar-tracking is unset, disable it.

gcc/testsuite/ChangeLog:

	* gcc.dg/pr104381.c: New test.
2022-03-07 15:45:21 +01:00
Jakub Jelinek
02b7dd7f82 Add missing space in various string literals
After more than 2 years I've run my
https://gcc.gnu.org/ml/gcc-patches/2017-02/msg00844.html
script again.  While it has lots of false positives, it discovered
two bugs.

2022-03-07  Jakub Jelinek  <jakub@redhat.com>

gcc/c/
	* c-parser.cc (c_parser_omp_clause_map): Add missing space in string
	literal.
gcc/cp/
	* parser.cc (cp_parser_omp_clause_map): Add missing space in string
	literal.
2022-03-07 15:16:56 +01:00
Jakub Jelinek
027e304144 Fix up duplicated duplicated words in comments
Like in r10-7215-g700d4cb08c88aec37c13e21e63dd61fd698baabc 2 years ago,
I've run
grep -v 'long long\|optab optab\|template template\|double double' *.{[chS],cc} */*.{[chS],cc} *.def config/*/* 2>/dev/null | grep ' \([a-zA-Z]\+\) \1 '
and for the cases that looked clearly wrong changed them, mostly by removing
one of the duplicated words but in some cases with other changes.

2022-03-07  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* tree-ssa-propagate.cc: Fix up duplicated word issue in a comment.
	* config/riscv/riscv.cc: Likewise.
	* config/darwin.h: Likewise.
	* config/i386/i386.cc: Likewise.
	* config/aarch64/thunderx3t110.md: Likewise.
	* config/aarch64/fractional-cost.h: Likewise.
	* config/vax/vax.cc: Likewise.
	* config/rs6000/pcrel-opt.md: Likewise.
	* config/rs6000/predicates.md: Likewise.
	* ctfc.h: Likewise.
	* tree-ssa-uninit.cc: Likewise.
	* value-relation.h: Likewise.
	* gimple-range-gori.cc: Likewise.
	* ipa-polymorphic-call.cc: Likewise.
	* pointer-query.cc: Likewise.
	* ipa-sra.cc: Likewise.
	* internal-fn.cc: Likewise.
	* varasm.cc: Likewise.
	* gimple-ssa-warn-access.cc: Likewise.
gcc/analyzer/
	* store.cc: Fix up duplicated word issue in a comment.
	* analyzer.cc: Likewise.
	* engine.cc: Likewise.
	* sm-taint.cc: Likewise.
gcc/c-family/
	* c-attribs.cc: Fix up duplicated word issue in a comment.
gcc/cp/
	* cvt.cc: Fix up duplicated word issue in a comment.
	* pt.cc: Likewise.
	* module.cc: Likewise.
	* coroutines.cc: Likewise.
gcc/fortran/
	* trans-expr.cc: Fix up duplicated word issue in a comment.
	* gfortran.h: Likewise.
	* scanner.cc: Likewise.
gcc/jit/
	* libgccjit.h: Fix up duplicated word issue in a comment.
2022-03-07 15:00:20 +01:00
Martin Liska
b1d8198e7d arm: add missing space to error.
PR target/104794

gcc/ChangeLog:

	* config/arm/arm.cc (arm_option_override_internal): Add missing
	space.
2022-03-07 14:16:21 +01:00
Richard Biener
5db1d7f143 tree-optimization/104782 - adjust PR101636 fix
This reverts the reversion of r10-5979 amending the CTOR case
with a comment as to why the conversion is not necessary there.
It also adds a testcase (but not for the CTOR case).

2022-03-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/104782
	* tree-vect-slp.cc (vectorize_slp_instance_root_stmt):
	Re-instantiate r10-5979 fix, add comment.

	* gcc.dg/vect/pr104782.c: New testcase.
2022-03-07 12:33:35 +01:00
Martin Liska
40c1d4a07e MSP430: fix error message.
PR target/104797

gcc/ChangeLog:

	* config/msp430/msp430.cc (msp430_expand_delay_cycles): Remove
	parenthesis from built-in name.
2022-03-07 11:41:52 +01:00
Martin Liska
fcc48d2ed6 arm: fix option quoting in error messages.
PR target/104794

gcc/ChangeLog:

	* config/arm/arm.cc (arm_option_override_internal): Fix quoting
	of options in error messages.
	(arm_option_reconfigure_globals): Likewise.
2022-03-07 11:38:18 +01:00
Martin Liska
cfb46c944e translation: reuse string and use switch for codes
PR target/104794

gcc/ChangeLog:

	* config/arm/arm-builtins.cc (arm_expand_builtin): Reuse error
	message.  Fix ARM_BUILTIN_WRORHI and ARM_BUILTIN_WRORH that can
	have only range [0,32].
2022-03-07 11:37:55 +01:00
Jakub Jelinek
2472dcaa8c s390: Fix up *cmp_and_trap_unsigned_int<mode> constraints [PR104775]
The following testcase fails to assemble due to clgte %r6,0(%r1,%r10)
insn not being accepted by assembler.
My rough understanding is that in the RSY-b insn format the spot
in other formats used for index registers is used instead for M3 what
kind of comparison it is, so this patch follows what other similar
instructions use for constraint (i.e. one without index register).

2022-03-07  Jakub Jelinek  <jakub@redhat.com>

	PR target/104775
	* config/s390/s390.md (*cmp_and_trap_unsigned_int<mode>): Use
	S constraint instead of T in the last alternative.

	* gcc.target/s390/pr104775.c: New test.
2022-03-07 11:14:04 +01:00
Martin Liska
93ecb25cc6 translation: small fixes
PR translation/90148

gcc/fortran/ChangeLog:

	* intrinsic.cc (gfc_is_intrinsic): Remove asterisk from error
	message.

gcc/ChangeLog:

	* plugin.cc (default_plugin_dir_name): Remove <dir> from error
	message.
2022-03-07 11:03:58 +01:00
Martin Liska
d73ae7a72a Fix translation strings.
PR translation/90148

gcc/ChangeLog:

	* config/rs6000/rs6000.cc (rs6000_linux64_override_options): Put
	quote to a proper place.
	* plugin.cc (default_plugin_dir_name): Likewise.

gcc/fortran/ChangeLog:

	* intrinsic.cc (gfc_is_intrinsic): Put
	quote to a proper place.
2022-03-07 10:41:11 +01:00
Martin Liska
024bdd2262 rx: Fix translation string.
PR target/99297

gcc/ChangeLog:

	* config/rx/rx.cc (rx_expand_builtin_mvtc): Fix translation
	string.
2022-03-07 10:33:57 +01:00
Jakub Jelinek
3bd11f791e i386: Fix up cond_{and,ior,xor,mul}* [PR104779]
The following testcase ICEs, because the cond_andv* expander
has vector_operand predicates in both of the commutative inputs
and calls gen_andv*_mask which calls ix86_binary_operator_ok
in its condition, but nothing calls ix86_fixup_binary_operands_no_copy
during the expansion, which means cond_* accepts even operands
like 2 MEMs which then can't be matched.

The following patch handles it like most other insns that the other
cond_* patterns use - by having a separate define_expand that calls
ix86_fixup_binary_operands_no_copy and define_ins with
ix86_binary_operator_ok.

2022-03-07  Jakub Jelinek  <jakub@redhat.com>

	PR target/104779
	* config/i386/sse.md (avx512dq_mul<mode>3<mask_name>): New
	define_expand pattern.  Rename define_insn to ...
	(*avx512dq_mul<mode>3<mask_name>): ... this.
	(<code><mode>3_mask): New any_logic define_expand pattern.
	(<mask_codefor><code><mode>3<mask_name>): Rename to ...
	(*<code><mode>3<mask_name>): ... this.

	* gcc.target/i386/pr104779.c: New test.
2022-03-07 09:40:51 +01:00
Rasmus Villemoes
0f0b428961 libstdc++: vxworks: remove stray <iostream> include
There doesn't seem to be any reason for this TU to include
<iostream>, and it causes errors when the resulting libstdc++ is used
on our VxWorks 5.5 target - presumably because now libstdc++ itself
contains an instance of std::ios_base::Init. Which should be mostly
harmless, but apparently isn't, and from a QoI viewpoint should
probably be avoided anyway.

libstdc++-v3/ChangeLog:

	* config/locale/vxworks/ctype_members.cc: Remove <iostream>
	  include.
2022-03-07 08:44:46 +01:00
GCC Administrator
aad3d93518 Daily bump. 2022-03-07 00:16:20 +00:00
Roger Sayle
98cd717fca [Committed] Update gcc.dg/lower-subreg-1.c on ia32.
This updates gcc.dg/lower-subreg-1.c to reflect that the i386 backend now
lowers iordi3 itself, rather than relying on the middle-end's subreg1 pass.
Committed as obvious.

2022-03-06  Roger Sayle  <roger@nextmovesoftware.com>

gcc/testsuite/ChangeLog
	* gcc.dg/lower-subreg-1.c: Update test case.  iordi3 is no longer
	lowered by the RTL subreg1 pass on ia32 [even with -mno-stv].
2022-03-06 11:03:00 +00:00
GCC Administrator
762181c5d6 Daily bump. 2022-03-06 00:16:16 +00:00
Jonathan Wakely
d3a757af21 libstdc++: Ensure __glibcxx_assert_fail has default visibility
This ensures there's no linker error if libstdc++ headers are included
following a pragma that sets hidden visibility.

Similarly for std::__terminate, which is always-inline so shouldn't
matter, but it's not wrong to do this anyway.

libstdc++-v3/ChangeLog:

	* include/bits/c++config (__glibcxx_assert_fail): Add visibility
	attribute.
	(__terminate): Likewise.
2022-03-05 20:33:36 +00:00
Jakub Jelinek
dab41c9d9f waccess: Remove visited bitmap and stop on EDGE_ABNORMAL
On Fri, Mar 04, 2022 at 02:58:37PM +0100, Jakub Jelinek via Gcc-patches wrote:
> On Thu, Mar 03, 2022 at 05:08:30PM -0700, Martin Sebor wrote:
> > > 1) shouldn't it give up for EDGE_ABNORMAL too?  I mean, e.g.
> > >     following a non-local goto forced edge from a noreturn call
> > >     to a non-local label (if there is just one) doesn't seem
> > >     right to me
> >
> > Possibly yes.  I can add it but I don't have a lot of experience with
> > these bits so if you can suggest a test case to exercise this that
> > would be helpful.
>
> Something like:
> void
> foo (void)
> {
>   __label__ l;
>   __attribute__((noreturn)) void bar (int x) { if (x) goto l; __builtin_trap (); }
>   bar (0);
> l:;
> }
> shows a single EDGE_ABNORMAL from the bar call.
> But it would need tweaking for the ptr use and clobber.
>
> > > 2) if EDGE_DFS_BACK is computed and 1) is done, is there any
> > >     reason why you need 2 levels of protection, i.e. the EDGE_DFS_BACK
> > >     check as well as the visited bitmap (and having them use
> > >     very different answers, if EDGE_DFS_BACK is seen, the function
> > >     will return false, if visited bitmap has a bb, it will return true)?
> > >     Can't the visited bitmap go away?
> >
> > Possibly.  As I said above, I don't have enough experience with these
> > bits to make (and test) the changes quickly, or enough bandwidth to
> > come up to speed on them.  Please feel free to make these improvements.
>
> I'll change that if it passes testing.

Here is a patch to do both.  I don't think we really need to have a testcase
for the EDGE_ABNORMAL case (Martin, feel free to add it later), abnormal
edges simply aren't normal control flow and what exactly it means varies.

2022-03-05  Jakub Jelinek  <jakub@redhat.com>

	* gimple-ssa-warn-access.cc (pass_waccess::use_after_inval_p): Remove
	visited bitmap and its use.  Also punt on EDGE_ABNORMAL edges.
2022-03-05 12:20:47 +01:00
Roger Sayle
8ea4a34bd0 PR 104732: Simplify/fix DI mode logic expansion/splitting on -m32.
This clean-up patch resolves PR testsuite/104732, the failure of the recent
test gcc.target/i386/pr100711-1.c on 32-bit Solaris/x86.  Rather than just
tweak the testcase, the proposed approach is to fix the underlying problem
by removing the "TARGET_STV && TARGET_SSE2" conditionals from the DI mode
logical operation expanders and pre-reload splitters in i386.md, which as
I'll show generate inferior code (even a GCC 12 regression) on !TARGET_64BIT
whenever -mno-stv (such as Solaris) or -msse (but not -msse2).

First a little bit of history.  In the beginning, DImode operations on
i386 weren't defined by the machine description, and lowered during RTL
expansion to SI mode operations.  The with PR 65105 in 2015, -mstv was
added, together with a SWIM1248x mode iterator (later renamed to SWIM1248x)
together with several *<code>di3_doubleword post-reload splitters that
made use of register allocation to perform some double word operations
in 64-but XMM registers.  A short while later in 2016, PR 70322 added
similar support for one_cmpldi2.  All of this logic was dependent upon
"!TARGET_64BIT && TARGET_STV && TARGET_SSE2".  With the passing of time,
these conditions became irrelevant when in 2019, it was decided to split
these double-word patterns before reload.
https://gcc.gnu.org/pipermail/gcc-patches/2019-June/523877.html
https://gcc.gnu.org/pipermail/gcc-patches/2019-October/532236.html
Hence the current situation, where on most modern CPU architectures
(where "TARGET_STV && TARGET_SSE2" is true), RTL is expanded with DI
mode operations, that are then split into two SI mode instructions
before reload, except on Solaris and other odd cases, where the splitting
is to two SI mode instructions is done during RTL expansion.  By the
time compilation reaches register allocation both paths in theory
produce identical or similar code, so the vestigial legacy/logic would
appear to be harmless.

Unfortunately, there is one place where this arbitrary choice of how
to lower DI mode doubleword operations is visible to the middle-end,
it controls whether the backend appears to have a suitable optab, and
the presence (or not) of DImode optabs can influence vectorization
cost models and veclower decisions.

The issue (and code quality regression) can be seen in this test case:

typedef long long v2di __attribute__((vector_size (16)));
v2di x;
void foo (long long a)
{
    v2di t = {a, a};
    x = ~t;
}

which when compiled with "-O2 -m32 -msse -march=pentiumpro" produces:

foo:    subl    $28, %esp
        movl    %ebx, 16(%esp)
        movl    32(%esp), %eax
        movl    %esi, 20(%esp)
        movl    36(%esp), %edx
        movl    %edi, 24(%esp)
        movl    %eax, %esi
        movl    %eax, %edi
        movl    %edx, %ebx
        movl    %edx, %ecx
        notl    %esi
        notl    %ebx
        movl    %esi, (%esp)
        notl    %edi
        notl    %ecx
        movl    %ebx, 4(%esp)
        movl    20(%esp), %esi
        movl    %edi, 8(%esp)
        movl    16(%esp), %ebx
        movl    %ecx, 12(%esp)
        movl    24(%esp), %edi
        movss   8(%esp), %xmm1
        movss   12(%esp), %xmm2
        movss   (%esp), %xmm0
        movss   4(%esp), %xmm3
        unpcklps        %xmm2, %xmm1
        unpcklps        %xmm3, %xmm0
        movlhps %xmm1, %xmm0
        movaps  %xmm0, x
        addl    $28, %esp
        ret

Importantly notice the four "notl" instructions.  With this patch:

foo:	subl    $28, %esp
        movl    32(%esp), %edx
        movl    36(%esp), %eax
        notl    %edx
        movl    %edx, (%esp)
        notl    %eax
        movl    %eax, 4(%esp)
        movl    %edx, 8(%esp)
        movl    %eax, 12(%esp)
        movaps  (%esp), %xmm1
        movaps  %xmm1, x
        addl    $28, %esp
        ret

Notice only two "notl" instructions.  Checking with godbolt.org, GCC
generated 4 NOTs in GCC 4.x and 5.x, 2 NOTs between GCC 6.x and 9.x,
and regressed to 4 NOTs since GCC 10.x [which hopefully qualifies
this clean-up as suitable for stage 4].

Most significantly, this patch allows pr100711-1.c to pass with
-mno-stv, allowing pandn to be used with V2DImode on Solaris/x86.
Fingers-crossed this should reduce the number of discrepancies
encountered supporting Solaris/x86.

2022-03-05  Roger Sayle  <roger@nextmovesoftware.com>
	    Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog
	PR testsuite/104732
	* config/i386/i386.md (SWIM1248x): Renamed from SWIM1248s.
	Include DI mode unconditionally.
	(*anddi3_doubleword): Remove && TARGET_STV && TARGET_SSE2 condition,
	i.e. always split on !TARGET_64BIT.
	(*<any_or>di3_doubleword): Likewise.
	(*one_cmpldi2_doubleword): Likewise.
	(and<mode>3 expander): Update to use SWIM1248x from SWIM1248s.
	(<any_or><mode>3 expander): Likewise.
	(one_cmpl<mode>2 expander): Likewise.

gcc/testsuite/ChangeLog
	PR testsuite/104732
	* gcc.target/i386/pr104732.c: New test case.
2022-03-05 08:50:45 +00:00
Michael Meissner
1301d7f647 Optimize signed DImode -> TImode on power10.
On power10, GCC tries to optimize the signed conversion from DImode to
TImode by using the vextsd2q instruction.  However to generate this
instruction, it would have to generate 3 direct moves (1 from the GPR
registers to the altivec registers, and 2 from the altivec registers to
the GPR register).

This patch generates the shift right immediate instruction to do the
conversion if the target/source registers ares GPR registers like it does
on earlier systems.  If the target/source registers are Altivec registers,
it will generate the vextsd2q instruction.

2022-03-05   Michael Meissner  <meissner@linux.ibm.com>

gcc/
	PR target/104698
	* config/rs6000/vsx.md (UNSPEC_MTVSRD_DITI_W1): Delete.
	(mtvsrdd_diti_w1): Delete.
	(extendditi2): Convert from define_expand to
	define_insn_and_split.  Replace with code to deal with both GPR
	registers and with altivec registers.

gcc/testsuite/
	PR target/104698
	* gcc.target/powerpc/pr104698-1.c: New test.
	* gcc.target/powerpc/pr104698-2.c: New test.
2022-03-05 00:01:52 -05:00
GCC Administrator
8d96e14c1d Daily bump. 2022-03-05 00:16:31 +00:00
Joseph Myers
93557e6dc3 Update gcc de.po
* de.po: Update.
2022-03-04 23:56:02 +00:00
Segher Boessenkool
77eccbf39e rs6000: Improve .machine
This adds more correct .machine for most older CPUs.  It should be
conservative in the sense that everything we handled before we handle at
least as well now.  This does not yet revamp the server CPU handling, it
is too risky at this point in time.

Tested on powerpc64-linux {-m32,-m64}.  Also manually tested with all
-mcpu=, and the output of that passed through the GNU assembler.

2022-03-04  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.cc (rs6000_machine_from_flags): Restructure a
	bit.  Handle most older CPUs.
2022-03-04 23:51:59 +00:00
Joseph Myers
0e5d9ae8e4 Update .po files
gcc/po/
	* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
	zh_TW.po: Update.

libcpp/po/
	* be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, fi.po, fr.po,
	id.po, ja.po, nl.po, pt_BR.po, ru.po, sr.po, sv.po, tr.po, uk.po,
	vi.po, zh_CN.po, zh_TW.po: Update.
2022-03-04 22:03:22 +00:00
Nathan Sidwell
591d213034 c++: Standard mangling abbreviations & modules
The std manglings for things like std::string should not apply if
we're not in the global module.

gcc/cp/
	* mangle.cc (is_std_substitution): Check global module.
	(is_std_substitution_char): Return bool.
gcc/testsuite/
	* g++.dg/modules/std-subst-2.C: New.
	* g++.dg/modules/std-subst-3.C: New.
	* g++.dg/modules/std-subst-4_a.C: New.
	* g++.dg/modules/std-subst-4_b.C: New.
	* g++.dg/modules/std-subst-4_c.C: New.
2022-03-04 14:59:28 -05:00
Thomas Schwinge
14dfbb5359 Fix 'libgomp.oacc-c-c++-common/kernels-decompose-1.c' expected diagnostics
Fix-up for recent commit 8935589b49
"OMP lowering: Regimplify 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs
[PR100280, PR104132, PR104133]": adjust for a GCN offloading workaround
added just before commit: '(volatile void *) &f1;'.

	PR testsuite/104791
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Fix
	expected diagnostics.
2022-03-04 20:42:29 +01:00
David Malcolm
458ad38ce2 analyzer: reduce svalue depth limit from 13 to 12 [PR103521]
PR analyzer/103521 reports that commit r12-5585-g132902177138c09803d639e12b1daebf2b9edddc
("analyzer: further false leak fixes due to overzealous state merging [PR103217]")
led to failures of gcc.dg/analyzer/pr93032-mztools.c on some targets,
where rather than reporting FILE * leaks, the analyzer would hit
complexity limits and give up.

The cause is that pr93032-mztools.c has some 'unsigned char' values that
are copied to 'char'.  On targets where 'char' defaults to being signed,
this leads to casts, whereas on targets where 'char' defaults to being
unsigned, no casts are needed.

When the casts occur, various symbolic values within the loop (the
locals 'crc', 'cpsize', and 'uncpsize') become sufficiently complex as
to hit the --param=analyzer-max-svalue-depth= limit, and are treated as
UNKNOWN, allowing the analysis of the loop to quickly terminate, with
much of this state as UNKNOWN (but retaining the FILE * information, and
thus correctly reporting the FILE * leaks).

Without the casts, the symbolic values for these variables don't quite
hit the complexity limit, and the analyzer attempts to track these
values in the loop, leading to the analyzer eventually hitting the
per-program-point limit on the number of states, and giving up on
these execution paths, thus failing to report the FILE * leaks.

This patch tweaks the default value of the param:
  --param=analyzer-max-svalue-depth=.
from 13 down to 12.  This allows the pr93032-mztools.c testcase to
succeeed with both -fsigned-char and -funsigned-char, and thus allows
this integration test to succeed on both styles of target without
requiring extra command-line flags.  The patch duplicates the test so
it runs with both -fsigned-char and -funsigned-char.

My hope is that this will allow similar cases to terminate loop analysis
earlier.  I tried reducing it further, but doing so caused some test
cases to regress.

The tradeoff here is between:
(a) precision of individual states in the analysis, versus
(b) maximizing code-path coverage in the analysis

I can imagine a more nuanced approach that splits the current
per-program-point hard limit into soft and hard limits: on hitting the
soft limit at a program point, go into a less precise mode for states
at that program point, in the hope that we can fully explore execution
paths beyond it without hitting the hard limit, but this seems like
GCC 13 material.

Another possible future fix might be for the analysis plan to make an
attempt to prioritize parts of the code in an enode budget, rather than
setting the same hard limit uniformly across all program points.

gcc/analyzer/ChangeLog:
	PR analyzer/103521
	* analyzer.opt (-param=analyzer-max-svalue-depth=): Reduce from 13
	to 12.

gcc/testsuite/ChangeLog:
	PR analyzer/103521
	* gcc.dg/analyzer/pr93032-mztools.c: Move to...
	* gcc.dg/analyzer/pr93032-mztools-signed-char.c: ...this, adding
	-fsigned-char to args, and...
	* gcc.dg/analyzer/pr93032-mztools-unsigned-char.c: ...copy to here,
	adding -funsigned-char to args.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2022-03-04 13:51:14 -05:00
Ian Lance Taylor
c3402486af mkruntimeinc: skip _FILE
We don't need it, and it breaks uclibc.

	PR go/101246

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/390021
2022-03-04 10:46:55 -08:00
Clément Chigot
e71079517f libgo: move golang.org/x/sync/semaphore to gotool packages
golang/x/sync/semaphore is required by gofmt.go.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/388634
2022-03-04 10:27:10 -08:00
Clément Chigot
6be8281c16 libgo: fix AIX build for the Go1.18 update
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/388635
2022-03-04 10:19:50 -08:00
Iain Sandoe
25587472cc Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler.
DECL_MD_FUNCTION_CODE() returns an int, on one particular compiler the
code in darwin_fold_builtin() triggers a warning.

Fixed thus.

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

gcc/ChangeLog:

	* config/darwin.cc (darwin_fold_builtin): Make fcode an int to
	avoid a mismatch with DECL_MD_FUNCTION_CODE().
2022-03-04 16:48:11 +00:00
Iain Sandoe
c18ddb05b0 Darwin, libgcc: Fix build errors on powerpc-darwin8.
PowerPC Darwin8 is the last version to use an unwind frame fallback routine.
This had been omitted from the new shared EH library, along with one more
header dependency that only fires there.

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

libgcc/ChangeLog:

	* config/rs6000/t-darwin-ehs: Add darwin-fallback.o.
	* config/t-darwin-ehs: Add dependency on unwind.h.
2022-03-04 16:44:54 +00:00
Patrick Palka
074d283e24 c++: Add testcase for already fixed PR [PR103443]
Fixed by r12-7264.

	PR c++/103443

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/consteval29.C: New test.
2022-03-04 10:17:30 -05:00
Nathan Sidwell
73baba1ae1 c++: New module mangling ABI
This implements a new module mangling ABI as the original one has a
few issues:

a) it was not demangleable (oops)

b) implemented a weak ownership model.

This implements a strong ownership model, so that exported entities
from named modules are mangled to include their module attachment.
This gives more informative linker diagnostics and better module
isolation.  Weak ownership was hoped to allow backwards compatibility
with non-modular code, but in practice was very brittle, and C++20
added new semantics for linkage declarations that cover the needed
functionality.

FAOD Clang is also moving to this ABI and documentation will be added
to the Itanium ABI specification.

gcc/cp/
	* cp-tree.h (mangle_identifier): Replace with ...
	(mangle_module_component): ... this.
	* mangle.cc (dump_substitution_candidates): Adjust.
	(add_substitution): Likewise.
	(find_substitution): Likewise.
	(unmangled_name_p): Likewise.
	(mangle_module_substitution): Reimplement.
	(mangle_module_component): New.
	(write_module, maybe_write_module): Adjust.
	(write_name): Drop modules here.
	(write_unqualified): Do them here instead.
	(mangle_global_init): Adjust.
	* module.cc (module_state::mangle): Adjust.
	(mangle_module): Likewise.
	(get_originating_module): Adjust.

gcc/testsuite/
	* g++.dg/modules/fn-inline-1_b.C: Adjust.
	* g++.dg/modules/fn-inline-1_c.C: Adjust.
	* g++.dg/modules/imp-inline-1_a.C: Adjust.
	* g++.dg/modules/imp-inline-1_b.C: Adjust.
	* g++.dg/modules/init-2_a.C: Adjust.
	* g++.dg/modules/init-2_b.C: Adjust.
	* g++.dg/modules/init-2_c.C: Adjust.
	* g++.dg/modules/member-def-2_d.C: Adjust.
	* g++.dg/modules/mod-sym-1.C: Adjust.
	* g++.dg/modules/mod-sym-2.C: Adjust.
	* g++.dg/modules/mod-sym-3.C: Adjust.
	* g++.dg/modules/sym-subst-1.C: Adjust.
	* g++.dg/modules/sym-subst-2_b.C: Adjust.
	* g++.dg/modules/sym-subst-3_a.C: Adjust.
	* g++.dg/modules/sym-subst-3_b.C: Adjust.
	* g++.dg/modules/sym-subst-4.C: Adjust.
	* g++.dg/modules/sym-subst-5.C: Adjust.
	* g++.dg/modules/sym-subst-6.C: Adjust.
	* g++.dg/modules/tpl-spec-1_a.C: Adjust.
	* g++.dg/modules/tpl-spec-2_b.C: Adjust.
	* g++.dg/modules/tpl-spec-2_d.C: Adjust.
	* g++.dg/modules/tpl-spec-3_a.C: Adjust.
	* g++.dg/modules/virt-1_a.C: Adjust.
	* g++.dg/modules/virt-2_a.C: Adjust.
	* g++.dg/modules/virt-2_b.C: Adjust.
	* g++.dg/modules/virt-2_c.C: Adjust.
	* g++.dg/modules/vtt-1_a.C: Adjust.
	* g++.dg/modules/vtt-1_b.C: Adjust.
2022-03-04 10:15:18 -05:00
Iain Sandoe
f1b3e38533 LRA, rs6000, Darwin: Revise lo_sum use for forced constants [PR104117].
Follow up discussion to the initial patch for this PR identified that it is
preferable to avoid the LRA change, and arrange for the target to reject the
hi and lo_sum selections when presented with an invalid address.

We split the Darwin high/low selectors into two:
 1. One that handles non-PIC addresses (kernel mode, mdynamic-no-pic).
 2. One that handles PIC addresses and rejects SYMBOL_REFs unless they are
    suitably wrapped in the MACHOPIC_OFFSET unspec.

The second case is handled by providing a new predicate (macho_pic_address)
that checks the requirements.

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

	PR target/104117

gcc/ChangeLog:

	* config/rs6000/darwin.md (@machopic_high_<mode>): New.
	(@machopic_low_<mode>): New.
	* config/rs6000/predicates.md (macho_pic_address): New.
	* config/rs6000/rs6000.cc (rs6000_legitimize_address): Do not
	apply the TLS processing to Darwin.
	* lra-constraints.cc (process_address_1): Revert the changes
	in r12-7209.
2022-03-04 15:06:25 +00:00
Peter Bergner
cb16bc3b5f rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble [PR104208, PR87496]
The glibc build is showing a build error due to extra "error" checking from my
PR87496 fix.  That checking was overeager, disallowing setting the long double
size to 64-bits if the 128-bit long double ABI had already been specified.
Now we only emit an error if we specify a 128-bit long double ABI if our
long double size is not 128 bits.  This also fixes an erroneous error when
-mabi=ieeelongdouble is used and ISA 2.06 is not enabled, but the long double
size has been changed to 64 bits.

2022-03-04  Peter Bergner  <bergner@linux.ibm.com>

gcc/
	PR target/87496
	PR target/104208
	* config/rs6000/rs6000.cc (rs6000_option_override_internal): Make the
	ISA 2.06 requirement for -mabi=ieeelongdouble conditional on
	-mlong-double-128.
	Move the -mabi=ieeelongdouble and -mabi=ibmlongdouble error checking
	from here...
	* common/config/rs6000/rs6000-common.cc (rs6000_handle_option):
	... to here.

gcc/testsuite/
	PR target/87496
	PR target/104208
	* gcc.target/powerpc/pr104208-1.c: New test.
	* gcc.target/powerpc/pr104208-2.c: Likewise.
	* gcc.target/powerpc/pr87496-2.c: Swap long double options to trigger
	the expected error.
	* gcc.target/powerpc/pr87496-3.c: Likewise.
2022-03-04 09:04:21 -06:00
Thomas Schwinge
e28eb86c18 Test 'libgomp.oacc-*/kernels-private-vars-*' with '--param=openacc-kernels=decompose' [PR104784]
Before recent commit 8935589b49
"OMP lowering: Regimplify 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs
[PR100280, PR104132, PR104133]", 'libgomp.oacc-c' testing already worked fine,
but 'libgomp.oacc-c++' testing ICEed.  Via the commit mentioned, the C++
testing ICEs are now resolved, but the underlying issue remains to be looked
into: PR104784 "OpenACC 'kernels' decomposition: C vs. C++ differences".

	PR middle-end/104784
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c:
	Test with '--param=openacc-kernels=decompose'.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90:
	Likewise.
2022-03-04 15:47:06 +01:00
Jakub Jelinek
c85aaf2cbe gimplify: Clear TREE_READONLY on automatic vars being stored into [PR104529]
The following testcase regressed when SRA started punting on stores to
TREE_READONLY vars.  We document that:
"In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
nonzero means it may not be the lhs of an assignment."
so the SRA change looks desirable.  On the other side, at least in this
testcase the TREE_READONLY is set there intentionally from the
PR85873 fix, because gimplify_init_constructor itself uses TREE_READONLY
on the object to determine if it can perform promotion to static const
or not.

So, similarly to other spots in the gimplifier where we also clear
TREE_READONLY when we emit IL that stores into the object, this
does the same in gimplify_init_constructor, but in the way so that
the TREE_READONLY test for the promotion to static const keeps working
and doesn't change anything for notify_temp_creation mode, which doesn't
emit any IL, just tests if it would need a temporary or not.

This keeps PR85873 testcase working as before and fixes this regression.

2022-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/104529
	* gimplify.cc (gimplify_init_constructor): Clear TREE_READONLY
	on automatic objects which will be runtime initialized.

	* g++.dg/tree-ssa/pr104529.C: New test.
2022-03-04 15:14:59 +01:00
Thomas Schwinge
07395f19df Test '-fopt-info-omp-all' in 'libgomp.oacc-*/kernels-private-vars-*'
libgomp/
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c:
	Test '-fopt-info-omp-all'.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90:
	Likewise.
2022-03-04 14:47:19 +01:00
Thomas Schwinge
8935589b49 OMP lowering: Regimplify 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs [PR100280, PR104132, PR104133]
... by generalizing the existing 'gcc/omp-low.cc:task_shared_vars'.

Fix-up for commit 9b32c1669a
"OpenACC 'kernels' decomposition: Mark variables used in
synthesized data clauses as addressable [PR100280]".

	PR middle-end/100280
	PR middle-end/104132
	PR middle-end/104133
	gcc/
	* omp-low.cc (task_shared_vars): Rename to
	'make_addressable_vars'.  Adjust all users.
	(scan_sharing_clauses) <OMP_CLAUSE_MAP> Use it for
	'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs, too.
	gcc/testsuite/
	* c-c++-common/goacc/kernels-decompose-pr104061-1-3.c: Adjust.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-4.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104132-1.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104133-1.c: Likewise.
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c:
	Extend.
2022-03-04 14:21:01 +01:00
Thomas Schwinge
de6e81ea96 OpenACC 'kernels' decomposition: Move 'TREE_ADDRESSABLE' setting into OMP lowering [PR100280]
... in preparation for later changes.  No functional change.

Follow-up to commit 9b32c1669a
"OpenACC 'kernels' decomposition: Mark variables used in
synthesized data clauses as addressable [PR100280]".

	PR middle-end/100280
	gcc/
	* tree.h (OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE): New.
	* tree-core.h: Document it.
	* omp-low.cc (scan_sharing_clauses) <OMP_CLAUSE_MAP>: Handle
	'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE'.
	* omp-oacc-kernels-decompose.cc (maybe_build_inner_data_region):
	Set 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' instead of
	'TREE_ADDRESSABLE'.
	gcc/testsuite/
	* c-c++-common/goacc/classify-kernels-unparallelized.c: Adjust.
	* c-c++-common/goacc/classify-kernels.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-2.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr100280-1.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-2.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-3.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-4.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104132-1.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104133-1.c: Likewise.
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/f-asyncwait-1.c: Adjust.
	* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c:
	Likewise.
2022-03-04 14:21:01 +01:00
Thomas Schwinge
e5ae22c561 Add diagnostic: "note: OpenACC 'kernels' decomposition: variable '[...]' declared in block made addressable" [PR100280]
Follow-up to commit 9b32c1669a
"OpenACC 'kernels' decomposition: Mark variables used in
synthesized data clauses as addressable [PR100280]".

	PR middle-end/100280
	gcc/
	* omp-oacc-kernels-decompose.cc (maybe_build_inner_data_region):
	Add diagnostic: "note: OpenACC 'kernels' decomposition: variable
	'[...]' declared in block made addressable".
	gcc/testsuite/
	* c-c++-common/goacc/classify-kernels-unparallelized.c: Add
	'--param=openacc-privatization=noisy'.
	* c-c++-common/goacc/classify-kernels.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-2.c: Adjust.
	* c-c++-common/goacc/kernels-decompose-pr100280-1.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-2.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-3.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-4.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104132-1.c: Likewise.
	* c-c++-common/goacc/kernels-decompose-pr104133-1.c: Likewise.
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/f-asyncwait-1.c: Adjust.
	* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c:
	Likewise.
2022-03-04 14:21:00 +01:00
Thomas Schwinge
c14ea6a72f Catch 'GIMPLE_DEBUG' misbehavior in OpenACC 'kernels' decomposition [PR100400, PR103836, PR104061]
Actually fixing it is a separate task, but it seems prudent to at least catch
it, and document via a few test cases.

	gcc/
	PR middle-end/100400
	PR middle-end/103836
	PR middle-end/104061
	* omp-oacc-kernels-decompose.cc (decompose_kernels_region_body):
	Catch 'GIMPLE_DEBUG'.
	gcc/testsuite/
	PR middle-end/100400
	PR middle-end/103836
	PR middle-end/104061
	* c-c++-common/goacc/kernels-decompose-pr100400-1-1.c: New.
	* c-c++-common/goacc/kernels-decompose-pr100400-1-2.c: New.
	* c-c++-common/goacc/kernels-decompose-pr100400-1-3.c: New.
	* c-c++-common/goacc/kernels-decompose-pr100400-1-4.c: New.
	* c-c++-common/goacc/kernels-decompose-pr103836-1-1.c: New.
	* c-c++-common/goacc/kernels-decompose-pr103836-1-2.c: New.
	* c-c++-common/goacc/kernels-decompose-pr103836-1-3.c: New.
	* c-c++-common/goacc/kernels-decompose-pr103836-1-4.c: New.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-1.c: New.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-2.c: New.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-3.c: New.
	* c-c++-common/goacc/kernels-decompose-pr104061-1-4.c: New.
2022-03-04 14:20:59 +01:00
Thomas Schwinge
e085900fa1 Add 'c-c++-common/goacc/kernels-decompose-pr104133-1.c' [PR104133]
..., currently XFAILed with 'dg-ice'.

	PR middle-end/104133
	gcc/testsuite/
	* c-c++-common/goacc/kernels-decompose-pr104133-1.c: New file.
2022-03-04 14:20:58 +01:00
Thomas Schwinge
741859b390 Add 'c-c++-common/goacc/kernels-decompose-pr104132-1.c' [PR104132]
..., currently XFAILed with 'dg-ice'.

	PR middle-end/104132
	gcc/testsuite/
	* c-c++-common/goacc/kernels-decompose-pr104132-1.c: New file.
2022-03-04 14:20:58 +01:00
Thomas Schwinge
fda0b0eb4f Update 'c-c++-common/goacc/classify-*', 'gfortran.dg/goacc/classify-*'
... to use 'dg-line', simplifying later changes.  Also some minor miscellaneous
diagnostics scanning maintenance.

	gcc/testsuite/
	* c-c++-common/goacc/classify-kernels-parloops.c: Update.
	* c-c++-common/goacc/classify-kernels-unparallelized-parloops.c:
	Likewise.
	* c-c++-common/goacc/classify-kernels-unparallelized.c: Likewise.
	* c-c++-common/goacc/classify-kernels.c: Likewise.
	* c-c++-common/goacc/classify-parallel.c: Likewise.
	* c-c++-common/goacc/classify-routine-nohost.c: Likewise.
	* c-c++-common/goacc/classify-routine.c: Likewise.
	* c-c++-common/goacc/classify-serial.c: Likewise.
	* gfortran.dg/goacc/classify-kernels-parloops.f95: Likewise.
	* gfortran.dg/goacc/classify-kernels-unparallelized-parloops.f95:
	Likewise.
	* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
	* gfortran.dg/goacc/classify-kernels.f95: Likewise.
	* gfortran.dg/goacc/classify-parallel.f95: Likewise.
	* gfortran.dg/goacc/classify-routine-nohost.f95: Likewise.
	* gfortran.dg/goacc/classify-routine.f95: Likewise.
	* gfortran.dg/goacc/classify-serial.f95: Likewise.
2022-03-04 14:13:45 +01:00
Jonathan Wakely
289f65d643 libstdc++: Fix -Wunused-local-typedefs warning in <compare>
libstdc++-v3/ChangeLog:

	* libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
	inside #if condition.
2022-03-04 10:43:29 +00:00
Jakub Jelinek
49bc9c6c1e tree: Fix up warn_deprecated_use [PR104627]
The r12-7287-g1b71bc7c8b18bd1b change improved the -Wdeprecated
warning for C++, but regressed it for C, in particular in
gcc.dg/deprecated.c testcase we now report a type that actually isn't
deprecated as deprecated instead of the one that is deprecated.

The following change tries to find the middle ground between what
we used to do before and what r12-7287 change does.
If TYPE_STUB_DECL (node) is non-NULL (that is what happens with
those C tests), then it will do what it used to do before (just smarter,
there is no need to lookup_attribute when it is called again a few lines
below this), if it is NULL, it will try
TYPE_STUB_DECL (TYPE_MAIN_VARIANT (node)) - what the deprecated-16.C
test needs.

2022-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR c/104627
	* tree.cc (warn_deprecated_use): For types prefer to use node
	and only use TYPE_MAIN_VARIANT (node) if TYPE_STUB_DECL (node) is
	NULL.
2022-03-04 09:53:36 +01:00