platform/upstream/gcc.git
3 years agoc++: enum in generic lambda in template [PR95317]
Jason Merrill [Mon, 5 Apr 2021 18:26:03 +0000 (14:26 -0400)]
c++: enum in generic lambda in template [PR95317]

Here we weren't instantiating the enumerators because the arglist still had
the template parameter for the generic lambda, so looking one up failed.  We
need to instantiate if the non-lambda enclosing scope is non-dependent.

gcc/cp/ChangeLog:

PR c++/95317
* pt.c (lookup_template_class_1): Do tsubst_enum when
tsubsting a generic lambda.

gcc/testsuite/ChangeLog:

PR c++/95317
* g++.dg/cpp1y/lambda-generic-enum1.C: New test.

3 years agoc++: lambda in DMI in class template [PR95870]
Jason Merrill [Mon, 5 Apr 2021 15:34:48 +0000 (11:34 -0400)]
c++: lambda in DMI in class template [PR95870]

Here enclosing_instantiation_of was failing to find a match because otctx is
struct S<T> and current_function_decl is S<int>::S(), so the latter has more
function contexts, and we end up trying to compare S() to NULL_TREE.

After spending a bit of time working on establishing the correspondence in
this case (class <=> constructor), it occurred to me that we could just use
DECL_SOURCE_LOCATION, which is unique for lambdas, since they cannot be
redeclared.  Since we're so close to release, for now I'm only doing this
for the case that was failing before.

gcc/cp/ChangeLog:

PR c++/95870
* pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
there is no enclosing non-lambda function.

gcc/testsuite/ChangeLog:

PR c++/95870
* g++.dg/cpp0x/lambda/lambda-nsdmi10.C: New test.

3 years agoFix small regression with -fdump-ada-spec
Eric Botcazou [Mon, 5 Apr 2021 17:49:56 +0000 (19:49 +0200)]
Fix small regression with -fdump-ada-spec

When the enumeration constants of an enumeration type are defined by
explicit values, the binding generated by -fdump-ada-spec does not use
an enumeration type on the Ada side, because the set of allowed values
in C/C++ is larger than the set of allowed values in Ada, but instead
use an integer subtype and defines a set of explicit constants, which
used to be of this subtype but were changed to the base type at some
point.  This reinstates the subtype for them.

gcc/c-family/
* c-ada-spec.c (is_simple_enum): Minor tweaks.
(dump_ada_enum_type): Add TYPE and PARENT parameters.  For non-simple
enumeral types use again the type name for the enumeration constants.
(dump_ada_node): Adjust call to dump_ada_enum_type.
(dump_nested_type): Likewise.

3 years agoHonor --disable-decimal-float on PowerPC Decimal/Float128 conversions
Michael Meissner [Mon, 5 Apr 2021 17:30:40 +0000 (13:30 -0400)]
Honor --disable-decimal-float on PowerPC Decimal/Float128 conversions

This patch fixes the problem that the Decimal <-> Float128 conversions
were built even if the user configured GCC with --disable-decimal-float.

libgcc/
2021-04-05  Florian Weimer  <fweimer@redhat.com>

* config/rs6000/t-float128 (fp128_ppc_funcs): Add decimal floating
point functions for $(decimal_float) only.

Co-Authored-By: Michael Meissner <meissner@linux.ibm.com>
3 years agoc++: Unneeded export query [PR 99380]
Nathan Sidwell [Mon, 5 Apr 2021 14:51:28 +0000 (07:51 -0700)]
c++: Unneeded export query [PR 99380]

This problem got introduced fixing a module numbering problem.  When
preprocessing a header unit, we don't need to send an EXPORT query
unless we're also determining dependencies, or the mapper asked us
to.  Sadly the testsuite isn't set up to test this kind of subtlety.
I manually did that with stdin/stdout.

PR c++/99380
gcc/cp/
* module.cc (name_pending_imports): Drop 'atend' parm.  Don't
query export when not needed.
(preprocess_module, preprocessed_module): Adjust.

3 years agoanalyzer: fix ICE on zero-arg calls passed to __attribute__((nonnull)) [PR 99906]
David Malcolm [Mon, 5 Apr 2021 14:51:46 +0000 (10:51 -0400)]
analyzer: fix ICE on zero-arg calls passed to __attribute__((nonnull)) [PR 99906]

gcc/analyzer/ChangeLog:
PR analyzer/99906
* analyzer.cc (maybe_reconstruct_from_def_stmt): Fix NULL
dereference on calls with zero arguments.
* sm-malloc.cc (malloc_state_machine::on_stmt): When handling
__attribute__((nonnull)), only call get_diagnostic_tree if the
result will be used.

gcc/testsuite/ChangeLog:
PR analyzer/99906
* gcc.dg/analyzer/pr99906.c: New test.

3 years agoanalyzer: fix apparent hang with -fanalyzer-verbosity=0 [PR analyzer/99886]
David Malcolm [Mon, 5 Apr 2021 14:48:01 +0000 (10:48 -0400)]
analyzer: fix apparent hang with -fanalyzer-verbosity=0 [PR analyzer/99886]

The analyzer appeared to enter an infinite loop on malloc-1.c
when -fanalyzer-verbosity=0 was used.  In fact, it was slowly
counting from 0 to 0xffffffff.

Root cause is looping up to effectively ((unsigned)0) - 1 in
diagnostic_manager::consolidate_conditions when there are no events
in the path.

Fixed by the following, which uses signed integers when subtracting
from path->num_events () when simplifying checker_paths.

gcc/analyzer/ChangeLog:
PR analyzer/99886
* diagnostic-manager.cc
(diagnostic_manager::prune_interproc_events): Use signed integers
when subtracting one from path->num_events ().
(diagnostic_manager::consolidate_conditions): Likewise.  Convert
next_idx to a signed int.

gcc/testsuite/ChangeLog:
PR analyzer/99886
* gcc.dg/analyzer/pr99886.c: New test.

3 years agoc++: extern template and static data member [PR99066]
Jason Merrill [Mon, 5 Apr 2021 03:32:32 +0000 (23:32 -0400)]
c++: extern template and static data member [PR99066]

'extern template' should mean that the relevant symbols are never emitted.
But in this case we were assuming that DECL_EXTERNAL was already set on the
variable, so we just needed to clear DECL_NOT_REALLY_EXTERN.  Since
DECL_EXTERNAL was not set, we emitted a definition of npos.

gcc/cp/ChangeLog:

PR c++/99066
* pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.

gcc/testsuite/ChangeLog:

PR c++/99066
* g++.dg/cpp0x/extern_template-6.C: New test.

3 years agoc++: constexpr if and nested generic lambda [PR99201]
Jason Merrill [Sun, 4 Apr 2021 05:01:56 +0000 (01:01 -0400)]
c++: constexpr if and nested generic lambda [PR99201]

When building up *_EXTRA_ARGS for a constexpr if or pack expansion, we need
to walk into the body of a lambda to find all the local_specializations that
we need to remember, like we do in find_parameter_packs_r.

gcc/cp/ChangeLog:

PR c++/99201
* pt.c (class el_data): Add visited field.
(extract_local_specs): Pass it to cp_walk_tree.
(extract_locals_r): Walk into the body of a lambda.

gcc/testsuite/ChangeLog:

PR c++/99201
* g++.dg/cpp1z/constexpr-if-lambda4.C: New test.

3 years agoc++: Fix print-tree for TEMPLATE_DECL
Jason Merrill [Fri, 2 Apr 2021 09:45:02 +0000 (05:45 -0400)]
c++: Fix print-tree for TEMPLATE_DECL

The if allows TEMPLATE_DECL, but then checking DECL_MODULE_IMPORT_P crashes
on TEMPLATE_DECL.  Fixed by stripping TEMPLATE_DECL first.

gcc/cp/ChangeLog:

* ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
template result.

3 years agod: Use weak linkage for template symbols instead of gnu.linkonce (PR99914)
Iain Buclaw [Sun, 14 Mar 2021 21:51:56 +0000 (22:51 +0100)]
d: Use weak linkage for template symbols instead of gnu.linkonce (PR99914)

The default linkage of templates in the D language is now DECL_WEAK
instead of  DECL_ONE_ONLY, if supported.  This better matches the
expected override semantics of template symbols compiled to object code.

For example:

 module rt.config;
 template rt_flag()
 {
   pragma(mangle, "rt_flag") __gshared bool rt_flag = true;
 }

 module main;
 extern(C) __gshared bool rt_flag = false;

The above currently does not succeed in linking due to there being
multiple definitions of `rt_flag' in different sections that aren't
considered mergeable.

The compiler flag enabling toggling of this has been given a clearer
named `-fweak-templates', which distinguishes itself from G++ `-fweak',
which is intended only for testing.

gcc/d/ChangeLog:

PR d/99914
* d-lang.cc (d_init): Disable flag_weak_templates if no support for
weak or one-only symbols.
* d-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
(DECL_INSTANTIATED): New macro.
(d_comdat_linkage): Remove declaration.
(d_linkonce_linkage): Remove declaration.
(set_linkage_for_decl): New declaration.
* decl.cc (DeclVisitor::visit (StructDeclaration *)): Replace call to
d_linkonce_linkage with setting DECL_INSTANTIATED.
(DeclVisitor::visit (ClassDeclaration *)): Likewise.
(DeclVisitor::visit (EnumDeclaration *)): Likewise.
(DeclVisitor::visit (InterfaceDeclaration *)): Remove call to
d_linkonce_linkage.
(get_symbol_decl): Call set_linkage_for_decl instead of
d_linkonce_linkage.
(d_finish_decl): Call set_linkage_for_decl.
(d_comdat_linkage): Made function static.  Only set DECL_COMDAT for
DECL_INSTANTIATED decls.
(d_linkonce_linkage): Remove function.
(d_weak_linkage): New function.
(set_linkage_for_decl): New function.
* gdc.texi (Runtime Options): Rename -fno-weak to -fno-weak-templates,
update documentation of option.
* lang.opt (fweak): Rename option to ...
(fweak-templates): ... this.  Update help string.
* modules.cc (get_internal_fn): Add Prot parameter.  Set generated
function flag.
(build_internal_fn): Update call to get_internal_fn.
(build_dso_cdtor_fn): Likewise.
(register_moduleinfo): Call d_finish_decl on dso_slot_node and
dso_initialized_node.
* typeinfo.cc (TypeInfoVisitor::internal_reference): Call
set_linkage_for_decl instead of d_comdat_linkage.
(TypeInfoDeclVisitor::visit (TypeInfoDeclaration *)): Remove calls to
d_linkonce_linkage and d_comdat_linkage.
(get_cpp_typeinfo_decl): Likewise.

gcc/testsuite/ChangeLog:

PR d/99914
* gdc.dg/pr99914.d: New test.

3 years agoTrivial testsuite fixes for nios2-elf.
Sandra Loosemore [Mon, 5 Apr 2021 00:55:46 +0000 (17:55 -0700)]
Trivial testsuite fixes for nios2-elf.

nios2-elf defaults to -fno-delete-null-pointer-checks, which causes
failures in tests that assume the option is enabled.  Make the
dependence explicit.

2021-04-04  Sandra Loosemore  <sandra@codesourcery.com>

gcc/testsuite/

* gcc.dg/ipa/propmalloc-4.c: Add -fdelete-null-pointer-checks.
* gcc.dg/tree-ssa/evrp11.c: Likewise.

3 years agoDaily bump.
GCC Administrator [Mon, 5 Apr 2021 00:16:27 +0000 (00:16 +0000)]
Daily bump.

3 years agoc++: array new initialized from a call [PR99643]
Jason Merrill [Sat, 3 Apr 2021 20:17:29 +0000 (16:17 -0400)]
c++: array new initialized from a call [PR99643]

Here the get_foo() call results in a TARGET_EXPR, which we strip in
massage_init_elt, but then when build_vec_init tries to use it to initialize
the array element we crash because build_aggr_init expects a class rvalue to
have a TARGET_EXPR.  So don't strip it.

The stripping was added in r206639 for PR59659, so I checked that removing
it didn't significantly increase compile time or memory usage for that
testcase; compile time was unaffected, memory usage increased by 0.00004%.

gcc/cp/ChangeLog:

PR c++/99643
* typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.

gcc/testsuite/ChangeLog:

PR c++/99643
* g++.dg/cpp0x/initlist-new5.C: New test.

3 years agoDaily bump.
GCC Administrator [Sun, 4 Apr 2021 00:16:26 +0000 (00:16 +0000)]
Daily bump.

3 years agod: Merge upstream dmd 3b808e838, druntime 483bc129, phobos f89dc217a
Iain Buclaw [Fri, 2 Apr 2021 11:29:22 +0000 (13:29 +0200)]
d: Merge upstream dmd 3b808e838, druntime 483bc129, phobos f89dc217a

D front-end changes:

 - Explicit package visibility attribute is now always applied to
   introducing scopes.

 - Added `__traits(totype, string)' to convert mangled type string to an
   existing type.

 - Printf-like and scanf-like functions are now detected by prefixing
   them with `pragma(printf)' for printf-like functions or
   `pragma(scanf)' for scanf-like functions.

 - Added `__c_wchar_t', `__c_complex_float', `__c_complex_double', and
   `__c_complex_real' types for interfacing with C and C++.

 - Template alias parameters can now be instantiated with basic types,
   such as `int` or `void function()`.

 - Mixins can now be used as types in the form `mixin(string) var'.

 - Mixin expressions can take an argument list, same as `pragma(msg)'.

 - Implement DIP1034, add `typeof(*null)' types to represent `noreturn'.

 - `pragma(msg)' can print expressions of type `void'.

 - It is now an error to use private variables selectively imported from
   other modules.  Due to a bug, some imported private members were
   visible from other modules, violating the specification.

 - Added new syntax to declare an alias to a function type using the
   `alias' syntax based on the assignment operator.

 - Function literals can now return a value by reference.

Phobos changes:

 - Synchronize C bindings with the latest port fixes in upstream druntime.

 - Added alias for a `noreturn' type in object.d

 - Make use of the new `pragma(printf)' and `pragma(scanf)' pragmas, fix
   all code that got flagged as being incorrect.

 - Fixed code that relied on bugs in the D import package system.

Reviewed-on: https://github.com/dlang/dmd/pull/12339
     https://github.com/dlang/druntime/pull/3422
     https://github.com/dlang/phobos/pull/7932

gcc/d/ChangeLog:

* dmd/MERGE: Merge upstream dmd 3b808e838.
* Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
* d-codegen.cc (build_struct_literal): Handle special enums.
* d-convert.cc (convert_expr): Handle noreturn type.
(convert_for_condition): Likewise.
* d-target.cc (Target::_init): Set type for wchar_t.
(TargetCPP::derivedClassOffset): New method.
(Target::libraryObjectMonitors): New method.
* decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
type noreturn.
* toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
noreturn types.
* types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
(TypeVisitor::visit (TypeEnum *)): Handle special enums.

libphobos/ChangeLog:

* libdruntime/MERGE: Merge upstream druntime 483bc129.
* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
core/sys/darwin/fcntl.d.
(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/unistd.d.
(DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/stdc/malloc.d.
* libdruntime/Makefile.in: Regenerate.
* src/MERGE: Merge upstream phobos f89dc217a.
* src/Makefile.am (PHOBOS_DSOURCES): Add std/regex/internal/tests2.d.
* src/Makefile.in: Regenerate.
* testsuite/libphobos.exceptions/chain.d: Fix format arguments.
* testsuite/libphobos.exceptions/line_trace.d: Likewise.

3 years agoinitialize pr94314-3.C counter
Alexandre Oliva [Sat, 3 Apr 2021 22:54:39 +0000 (19:54 -0300)]
initialize pr94314-3.C counter

The int counter in the main loop was uninitialized, so we might end up
looping a very large number of times before completing successfully.
I suspect that was unintended, so I'm adding a zero initializer.

for  gcc/testsuite/ChangeLog

* g++.dg/pr94314-3.C: Zero-initialize main loop counter.

3 years agosilence expected psabi warning in ipa-sra-19 on ppc-vxworks
Alexandre Oliva [Sat, 3 Apr 2021 22:54:37 +0000 (19:54 -0300)]
silence expected psabi warning in ipa-sra-19 on ppc-vxworks

The default CPU for our ppc-vx7r2 toolchain has no support for altivec
or vsx, so an ABI without vector support is selected.  The selected
calling conventions do not cover passing or returning vector types, so
-Wpsabi warns about such uses.

powerpc-ibm-aix* already silences these warnings with -Wno-psabi;
this patch extends that to powerpc-wrs-vxworks* too.

for  gcc/testsuite/ChangeLog

* gcc.dg/ipa/ipa-sra-19.c: Extend -Wno-psabi to ppc-vx7r2.

3 years agoc++: GC during late parsing collects live data [PR91416]
Marek Polacek [Fri, 2 Apr 2021 21:11:32 +0000 (17:11 -0400)]
c++: GC during late parsing collects live data [PR91416]

Coming back to
<https://gcc.gnu.org/pipermail/gcc-patches/2019-August/527699.html>:

This is a crash that points to a GC problem.  Consider this test:

  __attribute__ ((unused)) struct S {
    S() { }
  } s;

We're parsing a simple-declaration.  While parsing the decl specs, we parse
the attribute, which means creating a TREE_LIST using ggc_alloc_*.

A function body is a complete-class context so when parsing the
member-specification of this class-specifier, we parse the bodies of the
functions we'd queued in cp_parser_late_parsing_for_member.  This then
leads to this call chain:
cp_parser_function_definition_after_declarator -> expand_or_defer_fn ->
expand_or_defer_fn_1 -> maybe_clone_body -> expand_or_defer_fn ->
cgraph_node::finalize_function -> ggc_collect.

In this test, the ggc_collect call collects the TREE_LIST we had
allocated, and a crash duly ensues.

I couldn't do what Richard suggested, that is, attach the attribute list
to struct S, because we don't pass decl_specs from cp_parser_type_specifier
down to cp_parser_class_specifier.  Therefore I've attempted to do "push the
decl_specifiers onto a vec that is a GC root", except I couldn't really push
the decl_specifiers, because first I'd have to mark cp_decl_specifier_seq with
GTY(()) and even that wouldn't be enough for me to be able to create

  static GTY(()) vec<cp_decl_specifier_seq *, va_gc>

But here we only care about cp_decl_specifier_seq::attributes, so the
patch is just this.  I've also extended the test so now we test a nested
class too.

gcc/cp/ChangeLog:

PR c++/91416
* parser.c: Create a GC root for attributes in a decl specifier.
(cp_parser_type_specifier): Push/pop ->attributes onto/from it.

gcc/testsuite/ChangeLog:

PR c++/91416
* g++.dg/other/gc7.C: New test.

3 years agoDarwin : Fix out-of-bounds access to df_regs_ever_live.
Iain Sandoe [Sat, 3 Apr 2021 09:07:48 +0000 (10:07 +0100)]
Darwin : Fix out-of-bounds access to df_regs_ever_live.

During changes made for LRA (or, perhaps, even before) we omitted
a check that the current register we are working on is a hard reg
before we tried to note its liveness.

A stage 1 built with fsanitize=address catches this, as does any
attempt to build master with clang and -std=c++11.

gcc/ChangeLog:

* config/darwin.c (machopic_legitimize_pic_address): Check
that the current pic register is one of the hard reg set
before setting liveness.

3 years agoDarwin : Fix whitespace and delete unused code (NFC).
Iain Sandoe [Sat, 3 Apr 2021 09:04:12 +0000 (10:04 +0100)]
Darwin : Fix whitespace and delete unused code (NFC).

Fix some incorrect indenting and remove two cases where we had
code '#if 0'-d out.

gcc/ChangeLog:

* config/darwin.c (machopic_legitimize_pic_address): Fix
whitespace, remove unused code.

3 years agoFortran: Fix ICE on wrong code [PR99818].
Paul Thomas [Sat, 3 Apr 2021 11:49:50 +0000 (12:49 +0100)]
Fortran: Fix ICE on wrong code [PR99818].

2021-04-03  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran/ChangeLog

PR fortran/99818
* interface.c (compare_parameter): The codimension attribute is
applied to the _data field of class formal arguments.

gcc/testsuite/ChangeLog

PR fortran/99818
* gfortran.dg/coarray_48.f90: New test.

3 years agobswap: Fix up bswap_view_convert after the recent change [PR99882]
Jakub Jelinek [Sat, 3 Apr 2021 08:08:08 +0000 (10:08 +0200)]
bswap: Fix up bswap_view_convert after the recent change [PR99882]

Martin reported that my recent change to allow pointer types in bswap
broke valgrind.  The bswap_view_convert function used for the initialization
of vector CONSTRUCTOR from the identity or byte-swapped pieces unfortunately
didn't handle pointer types.  The following patch handles it there.

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

PR tree-optimization/99882
* gimple-ssa-store-merging.c (bswap_view_convert): Handle val with
pointer type.

* gcc.dg/pr99882.c: New test.

3 years agodse: Fix up hard reg conflict checking in replace_read [PR99863]
Jakub Jelinek [Sat, 3 Apr 2021 08:07:09 +0000 (10:07 +0200)]
dse: Fix up hard reg conflict checking in replace_read [PR99863]

Since PR37922 fix RTL DSE has hard register conflict checking
in replace_read, so that if the replacement sequence sets (or typically just
clobbers) some hard register (usually condition codes) we verify that
hard register is not live.
Unfortunately, it compares the hard reg set clobbered/set by the sequence
(regs_set) against the currently live hard register set, but it then
emits the insn sequence not at the current insn position, but before
store_insn->insn.
So, we should not compare against the current live hard register set,
but against the hard register live set at the point of the store insn.
Fortunately, we already have that remembered in store_insn->fixed_regs_live.

In addition to bootstrapping/regtesting this patch on x86_64-linux and
i686-linux, I've also added statistics gathering and it seems the only
place where we end up rejecting the replace_read is the newly added
testcase (the PR37922 is no longer effective at that) and fixed_regs_live
has been always non-NULL at the if (store_insn->fixed_regs_live) spot.
Rather than having there an assert, I chose to just keep regs_set
as is, which means in that hypothetical case where fixed_regs_live wouldn't
be computed for some store we'd still accept sequences that don't
clobber/set any hard registers and just punt on those that clobber/set
those.

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

PR rtl-optimization/99863
* dse.c (replace_read): Drop regs_live argument.  Instead of
regs_live, use store_insn->fixed_regs_live if non-NULL,
otherwise punt if insns sequence clobbers or sets any hard
registers.

* gcc.target/i386/pr99863.c: New test.

3 years agors6000: Fix up libgcc ABI when built with --with-long-double-format=ieee [PR97653]
Jakub Jelinek [Sat, 3 Apr 2021 08:05:32 +0000 (10:05 +0200)]
rs6000: Fix up libgcc ABI when built with --with-long-double-format=ieee [PR97653]

__floatunditf and __fixtfdi and a couple of other libgcc{.a,_s.so}
entrypoints for backwards compatibility should mean IBM double double
handling (i.e. IFmode), gcc emits such calls for that format and
form IEEE long double emits *kf* instead.
When gcc is configured without --with-long-double-format=ieee ,
everything is fine, but when it is not, we need to compile those
libgcc sources with -mno-gnu-attribute -mabi=ibmlongdouble.
The following snippet in libgcc/config/rs6000/t-linux was attempting
to ensure that, and for some routines it works fine (e.g. for _powitf2).
But, due to 4 different types of bugs it doesn't work for most of those
functions, which means that in --with-long-double-format=ieee
configured gcc those *tf* entrypoints instead handle the long double
arguments as if they were KFmode.

The bugs are:
1) the first few objs properly use $(objext) as suffix, but
   several other contain a typo and use $(object) instead,
   which is a variable that isn't set to anything, so we don't
   add .o etc. extensions
2) while unsigned fix are properly called _fixuns*, unsigned float
   are called _floatun* (without s), but the var was using there
   the extra s and so didn't match
3) the variable didn't cover any of the TF <-> TI conversions,
   only TF <-> DI conversions
4) nothing in libgcc_s.so was handled, as those object files are
   called *_s.o rather than *.o and IBM128_SHARED_OBJS used wrong
   syntax of the GNU make substitution reference, which should be
   $(var:a=b) standing for $(patsubst a,b,$(var)) but it used
   $(var:a:b) instead

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

PR target/97653
* config/rs6000/t-linux (IBM128_STATIC_OBJS): Fix spelling, use
$(objext) instead of $(object).  Use _floatunditf instead of
_floatunsditf.  Add tf <-> ti conversion objects.
(IBM128_SHARED_OBJS): Use proper substitution reference syntax.

3 years agors6000: Avoid -fpatchable-function-entry* regressions on powerpc64 be [PR98125]
Jakub Jelinek [Sat, 3 Apr 2021 08:03:15 +0000 (10:03 +0200)]
rs6000: Avoid -fpatchable-function-entry* regressions on powerpc64 be [PR98125]

The SECTION_LINK_ORDER changes broke powerpc64-linux ELFv1.  Seems
that the assembler/linker relies on the symbol mentioned for the
"awo" section to be in the same section as the symbols mentioned in
the relocations in that section (i.e. labels for the patchable area
in this case).  That is the case for most targets, including powerpc-linux
32-bit or powerpc64 ELFv2 (that one has -fpatchable-function-entry*
support broken for other reasons and it doesn't seem to be a regression).
But it doesn't work on powerpc64-linux ELFv1.
We emit:
        .section        ".opd","aw"
        .align 3
_Z3foov:
        .quad   .L._Z3foov,.TOC.@tocbase,0
        .previous
        .type   _Z3foov, @function
.L._Z3foov:
        .section        __patchable_function_entries,"awo",@progbits,_Z3foov
        .align 3
        .8byte  .LPFE1
        .section        .text._Z3foov,"axG",@progbits,_Z3foov,comdat
.LPFE1:
        nop
.LFB0:
        .cfi_startproc
and because _Z3foov is in the .opd section rather than the function text
section, it doesn't work.

I'm afraid I don't know what exactly should be done, whether e.g.
it could use
        .section        __patchable_function_entries,"awo",@progbits,.L._Z3foov
instead, or whether the linker should be changed to handle it as is, or
something else.

But because we have a P1 regression that didn't see useful progress over the
4 months since it has been filed and we don't really have much time, below
is an attempt to do a targetted reversion of H.J's patch, basically act as
if HAVE_GAS_SECTION_LINK_ORDER is never true for powerpc64-linux ELFv1,
but for 32-bit or 64-bit ELFv2 keep working as is.
This would give us time to resolve it for GCC 12 properly.

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

PR testsuite/98125
* targhooks.h (default_print_patchable_function_entry_1): Declare.
* targhooks.c (default_print_patchable_function_entry_1): New function,
copied from default_print_patchable_function_entry with an added flags
argument.
(default_print_patchable_function_entry): Rewritten into a small
wrapper around default_print_patchable_function_entry_1.
* config/rs6000/rs6000.c (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
Redefine.
(rs6000_print_patchable_function_entry): New function.

* g++.dg/pr93195a.C: Skip on powerpc*-*-* 64-bit.

3 years agoc++: NRV in lambda in template [PR91217]
Jason Merrill [Sat, 3 Apr 2021 05:07:36 +0000 (01:07 -0400)]
c++: NRV in lambda in template [PR91217]

tsubst_lambda_expr was producing a function with two blocks that claimed to
be the outermost block in the function body, one from the call to
start_lambda_function in tsubst_lambda_expr, and one from tsubsting the
block added by start_lambda_function when we first parsed the lambda.  This
messed with the named return value optimization, which only works for
variables in the outermost block.

gcc/cp/ChangeLog:

PR c++/91217
* pt.c (tsubst_lambda_expr): Skip the body block from
DECL_SAVED_TREE.

gcc/testsuite/ChangeLog:

PR c++/91217
* g++.dg/opt/nrv20.C: New test.

3 years agoc++: PMF template parm and noexcept [PR90664]
Jason Merrill [Fri, 2 Apr 2021 21:07:12 +0000 (17:07 -0400)]
c++: PMF template parm and noexcept [PR90664]

The constexpr code only wants to preserve PTRMEM_CST in conversions if the
conversions are only qualification conversions; dropping noexcept counts as
a qualification adjustment in overload resolution, so let's include it here.

gcc/cp/ChangeLog:

PR c++/90664
* cvt.c (can_convert_qual): Check fnptr_conv_p.

gcc/testsuite/ChangeLog:

PR c++/90664
* g++.dg/cpp1z/noexcept-type24.C: New test.

3 years agoc++: dependent attribute on parameter [PR97900]
Jason Merrill [Fri, 2 Apr 2021 18:49:15 +0000 (14:49 -0400)]
c++: dependent attribute on parameter [PR97900]

We were copying attributes from the template to the instantiation without
considering that they might be dependent.  To make sure that the new parms
have the appropriate properties for the code pattern, let's just regenerate
them.

gcc/cp/ChangeLog:

PR c++/97900
* pt.c (regenerate_decl_from_template): tsubst_decl
the parms.

gcc/testsuite/ChangeLog:

PR c++/97900
* g++.dg/ext/vector40.C: New test.

3 years agoDaily bump.
GCC Administrator [Sat, 3 Apr 2021 00:16:28 +0000 (00:16 +0000)]
Daily bump.

3 years agoc++: placeholder type constraint inside range-for [PR99869]
Patrick Palka [Fri, 2 Apr 2021 23:46:24 +0000 (19:46 -0400)]
c++: placeholder type constraint inside range-for [PR99869]

In the testcase below, during ahead-of-time deduction of a constrained
auto inside a range-based for loop, we trip over an assert within
do_auto_deduction which expects the deduction context to be
adc_return_type or adc_variable_type, but do_range_for_auto_deduction
calls do_auto_deduction with the context defaulted to adc_unspecified.

We could safely relax the assert to also accept adc_unspecified, but it
seems the deduction context should really be adc_variable_type here.

gcc/cp/ChangeLog:

PR c++/99869
* parser.c (do_range_for_auto_deduction): Pass adc_variable_type
to do_auto_deduction.

gcc/testsuite/ChangeLog:

PR c++/99869
* g++.dg/cpp2a/concepts-placeholder6.C: New test.

3 years agoc++: Refine check for CTAD placeholder [PR99586]
Patrick Palka [Fri, 2 Apr 2021 23:47:09 +0000 (19:47 -0400)]
c++: Refine check for CTAD placeholder [PR99586]

In the below testcase, during finish_compound_literal for A<B{V}>{},
type_uses_auto finds and returns the CTAD placeholder for B{V}, which
tricks us into attempting CTAD on A<B{V}>{} and leads to bogus errors.

AFAICT 'type' will always be a bare 'auto' in the CTAD case so we don't
need to look deeply to find it; checking template_placeholder_p instead
should suffice here.

gcc/cp/ChangeLog:

PR c++/99586
* semantics.c (finish_compound_literal): Check
template_placeholder_p instead of type_uses_auto.

gcc/testsuite/ChangeLog:

PR c++/99586
* g++.dg/cpp2a/nontype-class42.C: New test.

3 years agoc++: lambda pack init-capture within generic lambda
Jason Merrill [Fri, 2 Apr 2021 15:05:46 +0000 (11:05 -0400)]
c++: lambda pack init-capture within generic lambda

We represent the type of a pack init-capture as auto... with packs from the
initializer stuck into PACK_EXPANSION_PARAMETER_PACKS so that expanding it
produces the right number of elements.  But when partially instantiating the
auto..., we were changing PACK_EXPANSION_PARAMETER_PACKS to refer to only
the auto itself.  Fixed thus.

gcc/cp/ChangeLog:

PR c++/97938
* cp-tree.h (PACK_EXPANSION_AUTO_P): New.
* lambda.c (add_capture): Set it.
* pt.c (tsubst_pack_expansion): Handle it.

gcc/testsuite/ChangeLog:

PR c++/97938
* g++.dg/cpp2a/lambda-pack-init6.C: New test.

3 years agoc++: header unit purview [PR 99283]
Nathan Sidwell [Fri, 2 Apr 2021 13:28:29 +0000 (06:28 -0700)]
c++: header unit purview [PR 99283]

This case occurs due to some equivocation about module_purview.
Header-unit building is treated as a module-purview, but we should not
treat entities imported from that as module purview.  (header units
were not a thing when I started).  The testcase didn't understand we
had a local textual definition, but it was (incorrectly) marked as
module-purview, because we'd read in a declaration from a header unit
too.

gcc/cp/
* cp-tree.h (lang_decl_base): Correct module flag comment.
* module.cc (trees_in::assert_definition): Break out
not_tmpl var.
(trees_out::lang_decl_bools): Do not write purview for header units.
gcc/testsuite/
* g++.dg/modules/pr99283-6_d.H: New.
* g++.dg/modules/pr99283-7-swap.h: New.
* g++.dg/modules/pr99283-7-traits.h: New.
* g++.dg/modules/pr99283-7_a.H: New.
* g++.dg/modules/pr99283-7_b.H: New.
* g++.dg/modules/pr99283-7_c.C: New.
* g++.dg/modules/pr99283-7_d.H: New.

3 years agoMinor tweak to description of fdelete-dead-exceptions
Eric Botcazou [Fri, 2 Apr 2021 08:44:49 +0000 (10:44 +0200)]
Minor tweak to description of fdelete-dead-exceptions

gcc/
* doc/invoke.texi (fdelete-dead-exceptions): Minor tweak.

3 years agoSkip couple of Go tests on 32-bit SPARC
Eric Botcazou [Fri, 2 Apr 2021 08:44:08 +0000 (10:44 +0200)]
Skip couple of Go tests on 32-bit SPARC

Since they are already skipped on other 32-bit architectures.

gcc/testsuite/
* go.test/test/fixedbugs/issue6036.go: Skip on sparc.
* go.test/test/fixedbugs/issue22200b.go: Likewise.

3 years agotestsuite: Fix up gcc.target/i386/pr99726.c test [PR99726]
Jakub Jelinek [Fri, 2 Apr 2021 08:07:50 +0000 (10:07 +0200)]
testsuite: Fix up gcc.target/i386/pr99726.c test [PR99726]

-m32 shouldn't be used in gcc.target/i386/ testcases, people do
test with -m32/-m64 to get 32-bit compilation tested.
And, -floop-nest-optimize is a graphite optimization, so might not
be enabled in all gcc builds.

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

PR tree-optimization/99726
* gcc.target/i386/pr99726.c: Remove -m32 from dg-options.  Move
-floop-nest-optimize to dg-additional-options guarded on fgraphite
effective target.

3 years agoDaily bump.
GCC Administrator [Fri, 2 Apr 2021 00:16:26 +0000 (00:16 +0000)]
Daily bump.

3 years agoanalyzer: record per-enode saved_diagnostics
David Malcolm [Thu, 1 Apr 2021 22:22:52 +0000 (18:22 -0400)]
analyzer: record per-enode saved_diagnostics

Various places iterate through all of the saved_diagnostics to find
just the ones that are at a given enode.  This patch adds a per-enode
record of the diagnostics that are at each node, to save iterating
through all of the diagnostics each time.

gcc/analyzer/ChangeLog:
* diagnostic-manager.cc (diagnostic_manager::add_diagnostic): Make
enode param non-constant, and call add_diagnostic on it.  Add
enode index to log message.
(diagnostic_manager::add_diagnostic): Make enode param
non-constant.
* diagnostic-manager.h (diagnostic_manager::add_diagnostic):
Likewise for both decls.
* engine.cc
(impl_region_model_context::impl_region_model_context): Likewise
for enode_for_diag.
(impl_sm_context::impl_sm_context): Likewise.
(impl_sm_context::m_enode_for_diag): Likewise.
(exploded_node::dump_dot): Don't pass the diagnostic manager
to dump_saved_diagnostics.
(exploded_node::dump_saved_diagnostics): Drop param.  Iterate
directly through all saved diagnostics for the enode, rather
than all saved diagnostics in the diagnostic_manager and
filtering.
(exploded_node::on_stmt): Make non-const.
(exploded_node::on_edge): Likewise.
(exploded_node::on_longjmp): Likewise.
(exploded_node::detect_leaks): Likewise.
(exploded_graph::get_or_create_node): Make enode_for_diag param
non-const.
(exploded_graph_annotator::print_enode): Iterate
directly through all saved diagnostics for the enode, rather
than all saved diagnostics in the diagnostic_manager and
filtering.
* exploded-graph.h
(impl_region_model_context::impl_region_model_context): Make
enode_for_diag param non-constant.
(impl_region_model_context::m_enode_for_diag): Likewise.
(exploded_node::dump_saved_diagnostics): Drop param.
(exploded_node::on_stmt): Make non-const.
(exploded_node::on_edge): Likewise.
(exploded_node::on_longjmp): Likewise.
(exploded_node::detect_leaks): Likewise.
(exploded_node::add_diagnostic): New.
(exploded_node::get_num_diagnostics): New.
(exploded_node::get_saved_diagnostic): New.
(exploded_node::m_saved_diagnostics): New.
(exploded_graph::get_or_create_node): Make enode_for_diag param
non-constant.
* feasible-graph.cc (feasible_node::dump_dot): Drop
diagnostic_manager from call to dump_saved_diagnostics.
* program-state.cc (program_state::on_edge): Convert enode param
to non-const pointer.
(program_state::prune_for_point): Likewise for enode_for_diag
param.
* program-state.h (program_state::on_edge): Convert enode param
to non-const pointer.
(program_state::prune_for_point): Likewise for enode_for_diag
param.

3 years agoc++: GC collects live data when synthesizing operator== [PR99831]
Marek Polacek [Thu, 1 Apr 2021 14:42:43 +0000 (10:42 -0400)]
c++: GC collects live data when synthesizing operator== [PR99831]

Here we crash in reshape_init because we're accessing ggc_freed
& poisoned data: since r277865 in defaulted_late_check we call
synthesize_method here:

  if (kind == sfk_comparison)
    {
      /* If the function was declared constexpr, check that the definition
         qualifies.  Otherwise we can define the function lazily.  */
      if (DECL_DECLARED_CONSTEXPR_P (fn) && !DECL_INITIAL (fn))
        synthesize_method (fn);
      return;
    }

which in this test triggers when we're processing the string<"a">{} in
the static_assert.  First, we create a CONSTRUCTOR for the "{}" in
cp_parser_functional_cast, then we call finish_compound_literal which
calls complete_type and that results in garbage collection, which then
frees the CONSTRUCTOR {} we created when parsing the braced-list in
string<"a">{} -- at this point, it's not referenced by anything.
(That's not the case for 'type' in finish_compound_literal: the symbol
table contains a node for operator==, so ggc_mark_roots goes and marks
the fn decl, its type, its arguments etc., as used, so we don't collect
it.)

We could just bump function_depth around the new call to synthesize_method
to prevent GC.

gcc/cp/ChangeLog:

PR c++/99831
* method.c (defaulted_late_check): ++ and -- function_depth around
the call to synthesize_method.
* pt.c: Remove the saved_trees global.

gcc/testsuite/ChangeLog:

PR c++/99831
* g++.dg/other/gc6.C: New test.

3 years agoc++: variadic lambda noexcept-specifier [PR99583]
Jason Merrill [Thu, 1 Apr 2021 19:17:40 +0000 (15:17 -0400)]
c++: variadic lambda noexcept-specifier [PR99583]

The tree-walk looking for parameter packs didn't find this one because we
weren't stepping into TYPE_RAISES_EXCEPTIONS.

gcc/cp/ChangeLog:

PR c++/99583
PR c++/99584
* tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
TYPE_RAISES_EXCEPTIONS.

gcc/testsuite/ChangeLog:

PR c++/99583
* g++.dg/cpp0x/lambda/lambda-variadic12.C: New test.

3 years agomodules : Make sure we include <map> in system.h.
Iain Sandoe [Tue, 30 Mar 2021 13:56:39 +0000 (14:56 +0100)]
modules : Make sure we include <map> in system.h.

It appears that many targets include the map header transitively in
other std headers included from system.h.  However there are some
editions of clang/libc++ in Xcode that do not, which results in a
bootstrap fail - since when resolver.h is included  there is then a
conflict in declaring abort().

The fix is to ensure that map is pulled in by system.h and before
resolver.h is included.  As a precautionary measure and to alert
anyone perhaps adding another header to resolver.h this patch also
gates the direct includes there on !IN_GCC.

c++tools/ChangeLog:

* resolver.h: Do not include std headers directly when
building in GCC.

gcc/cp/ChangeLog:

* mapper-client.cc (INCLUDE_MAP): New; require map to be
included from system.h.
* mapper-resolver.cc (INCLUDE_MAP): Likewise.

3 years agoc++: Add ABI version for PR98481 fix
Jason Merrill [Wed, 31 Mar 2021 21:48:50 +0000 (17:48 -0400)]
c++: Add ABI version for PR98481 fix

The PR98481 fix corrects an ABI regression in GCC 10, but we don't want to
introduce an ABI change in the middle of the GCC 10 cycle.  This patch
introduces ABI v15 for the fix, which will be available but not default in
GCC 10.3; the broken behavior remains in ABI v14.  Compatibility aliases
will not be generated for this change.

gcc/ChangeLog:

PR c++/98481
* common.opt: Document v15 and v16.

gcc/c-family/ChangeLog:

PR c++/98481
* c-opts.c (c_common_post_options): Bump latest_abi_version.

gcc/cp/ChangeLog:

PR c++/98481
* mangle.c (write_expression): Adjust.
* class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
(mark_abi_tags_r): Likewise.

gcc/testsuite/ChangeLog:

PR c++/98481
* g++.dg/abi/abi-tag24a.C: New test.
* g++.dg/abi/macro0.C: Adjust expected value.

3 years agoc++: inter-cluster import order [PR 99283]
Nathan Sidwell [Thu, 1 Apr 2021 12:25:53 +0000 (05:25 -0700)]
c++: inter-cluster import order [PR 99283]

I finally managed to reduce the testcase without hitting other bugs.
This problem is caused by discovering a duplicate in the middle of
reading in the entity in question.  I had thougt the import seeding at
the beginning of a cluster prevented that, but it is insufficient.
Specifically an earlier cluster in the same module can cause the
import of a duplicate.  Although clusters within a module are
well-ordered, there is no ordering between clusters of one module and
clusters of another module.  And thus we can get duplicate declaration
loops.  This prevents the problem by also seeding references to
earlier clusters in the same module.  As the FIXME notes, it is
sufficient to reference a single entity in any particular earlier
cluster, plus, we also could determine the implicit dependencies and
prune that seeding even further.  I do not do that -- it decrease the
loading that will happen, but would reduce the serialization size.  As
ever, let's get correctness first.

PR c++/99283
gcc/cp/
* module.cc (trees_out::decl_node): Adjust importedness reference
assert.
(module_state::intercluster_seed): New.  Seed both imports and
inter-cluster references.  Broken out of ...
(module_state::write_cluster): ... here.  Call it.
gcc/testsuite/
* g++.dg/modules/pr99283-6.h: New.
* g++.dg/modules/pr99283-6_a.H: New.
* g++.dg/modules/pr99283-6_b.H: New.
* g++.dg/modules/pr99283-6_c.C: New.
* g++.dg/modules/hdr-init-1_c.C: Adjust scan.
* g++.dg/modules/indirect-3_c.C: Adjust scan.
* g++.dg/modules/indirect-4_c.C: Adjust scan.
* g++.dg/modules/lambda-3_b.C: Adjust scan.
* g++.dg/modules/late-ret-3_c.C: Adjust scan.
* g++.dg/modules/pr99425-1_b.H: Adjust scan.
* g++.dg/modules/pr99425-1_c.C: Adjust scan.

3 years agotree-optimization/99863 - clear vector CTOR TREE_SIDE_EFFECTS
Richard Biener [Thu, 1 Apr 2021 09:51:33 +0000 (11:51 +0200)]
tree-optimization/99863 - clear vector CTOR TREE_SIDE_EFFECTS

When we gimplify a vector CTOR the original CONSTRUCTOR tree remains
but we fail to recompute flags such as TREE_SIDE_EFFECTS.  This causes
later GENERIC folding of them in vector lowering to give up since
the match.pd machinery is careful about TREE_SIDE_EFFECTS.

Fixing this makes vector lowering produce much less garbage and
thus following the IL for PR99793 easier.

2021-04-01  Richard Biener  <rguenther@suse.de>

PR tree-optimization/99863
* gimplify.c (gimplify_init_constructor): Recompute vector
constructor flags.

3 years agoAdd testcase for PR98265
Jan Hubicka [Thu, 1 Apr 2021 10:11:39 +0000 (12:11 +0200)]
Add testcase for PR98265

gcc/testsuite/ChangeLog:

2021-04-01  Jan Hubicka  <hubicka@ucw.cz>

PR ipa/98265
* gcc.dg/tree-ssa/pr98265.C: New test.

3 years agodoc: Fix up symver attribute documentation
Jakub Jelinek [Thu, 1 Apr 2021 09:04:12 +0000 (11:04 +0200)]
doc: Fix up symver attribute documentation

When looking at the symver documentation, I've noticed a couple of
syntax errors in it.

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

* doc/extend.texi (symver attribute): Fix up syntax errors
in the examples.

3 years agobswap: Handle bswapping of pointers [PR96573]
Jakub Jelinek [Thu, 1 Apr 2021 08:51:03 +0000 (10:51 +0200)]
bswap: Handle bswapping of pointers [PR96573]

In GCC8/9 we used to optimize this into a bswap, but we no longer do.
Handling byteswapping of pointers is easy, all we need is to allow them,
for the __builtin_bswap* we already use TYPE_PRECISION to determine
the precision and we cast the operand and result to the correct type
if they aren't uselessly convertible to what the builtin expects.

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

PR tree-optimization/96573
* gimple-ssa-store-merging.c (init_symbolic_number): Handle
also pointer types.

* gcc.dg/pr96573.c: New test.

3 years agotree-optimization/99856 - fix overwideing pattern creation
Richard Biener [Thu, 1 Apr 2021 07:29:14 +0000 (09:29 +0200)]
tree-optimization/99856 - fix overwideing pattern creation

This fixes an omission of promoting a bit-precision required precision
to a vector element precision.

2021-04-01  Richard Biener  <rguenther@suse.de>

PR tree-optimization/99856
* tree-vect-patterns.c (vect_recog_over_widening_pattern): Promote
precision to vector element precision.

* gcc.dg/vect/pr99856.c: New testcase.

3 years agosra: Fix bug in grp_write propagation (PR 97009)
Martin Jambor [Thu, 1 Apr 2021 08:12:23 +0000 (10:12 +0200)]
sra: Fix bug in grp_write propagation (PR 97009)

SRA represents parts of aggregates which are arrays accessed with
unknown index as "unscalarizable regions."  When there are two such
regions one within another and the outer is only read whereas the
inner is written to, SRA fails to propagate that write information
across assignments.  This means that a second aggregate can contain
data while SRA thinks it does not and the pass can wrongly eliminate
big chunks of assignment from that second aggregate into a third
aggregate, which is what happens in PR 97009.

Fixed by checking all children of unscalariable accesses for the
grp_write flag.

gcc/ChangeLog:

2021-03-31  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/97009
* tree-sra.c (access_or_its_child_written): New function.
(propagate_subaccesses_from_rhs): Use it instead of a simple grp_write
test.

gcc/testsuite/ChangeLog:

2021-03-31  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/97009
* gcc.dg/tree-ssa/pr97009.c: New test.

3 years agoPR fortran/99840 - ICE in gfc_simplify_matmul, at fortran/simplify.c:4777
Harald Anlauf [Thu, 1 Apr 2021 05:49:32 +0000 (07:49 +0200)]
PR fortran/99840 - ICE in gfc_simplify_matmul, at fortran/simplify.c:4777

The simplification of the transposition of a constant array shall properly
initialize and set the shape of the result.

gcc/fortran/ChangeLog:

PR fortran/99840
* simplify.c (gfc_simplify_transpose): Properly initialize
resulting shape.

gcc/testsuite/ChangeLog:

PR fortran/99840
* gfortran.dg/transpose_5.f90: New test.

3 years agoDaily bump.
GCC Administrator [Thu, 1 Apr 2021 00:16:39 +0000 (00:16 +0000)]
Daily bump.

3 years agoanalyzer: avoid printing '<unknown>' for SSA names [PR99771]
David Malcolm [Mon, 29 Mar 2021 20:13:32 +0000 (16:13 -0400)]
analyzer: avoid printing '<unknown>' for SSA names [PR99771]

We don't want to print '<unknown>' in our diagnostics, but
PR analyzer/99771 lists various cases where -fanalyzer does, due to
using the SSA_NAME for a temporary when determining the best tree to
use.

This can happen in two ways:

(a) ...when a better expression than the SSA_NAME could be built, but
finding it requires traversing the relationships in the region_model
in a graph-like way, rather than by considering individual svalues and
regions.

(b) ...when the only remaining user of the underlying svalue is the
SSA_NAME, typically due to the diagnostic referring to a temporary.

I've been experimenting with fixing (a), but don't have a good fix yet.
In the meantime, this patch addresses (b) by detecting if we have
the SSA_NAME for a temporary, and, for the cases where it's possible,
reconstructing a tree by walking the def-stmts.  This fixes various
cases of (b) and ameliorates some cases of (a).

gcc/analyzer/ChangeLog:
PR analyzer/99771
* analyzer.cc (maybe_reconstruct_from_def_stmt): New.
(fixup_tree_for_diagnostic_1): New.
(fixup_tree_for_diagnostic): New.
* analyzer.h (fixup_tree_for_diagnostic): New decl.
* checker-path.cc (call_event::get_desc): Call
fixup_tree_for_diagnostic and use it for the call_with_state call.
(warning_event::get_desc): Likewise for the final_event and
make_label_text calls.
* engine.cc (impl_region_model_context::on_state_leak): Likewise
for the on_leak and add_diagnostic calls.
* region-model.cc (region_model::get_representative_tree):
Likewise for the result.

gcc/testsuite/ChangeLog:
PR analyzer/99771
* gcc.dg/analyzer/data-model-10.c: Update expected output.
* gcc.dg/analyzer/malloc-ipa-13.c: Likewise.
* gcc.dg/analyzer/malloc-ipa-13a.c: New test.
* gcc.dg/analyzer/pr99771-1.c: New test.

3 years agoMake USES_COMDAT_LOCAL CIF_FINAL_NORMAL
Jan Hubicka [Wed, 31 Mar 2021 20:44:20 +0000 (22:44 +0200)]
Make USES_COMDAT_LOCAL CIF_FINAL_NORMAL

USES_COMDAT_LOCAL is incorrectly defined as CIF_FINAL_ERROR which makes inliner
to mis some inlines of functions in comdat section that was previously split.

2021-03-31  Jan Hubicka  <hubicka@ucw.cz>

PR ipa/98265
* cif-code.def (USES_COMDAT_LOCAL): Make CIF_FINAL_NORMAL.

3 years agoUpdate prefixed attribute for Power10.
Pat Haugen [Wed, 31 Mar 2021 19:37:24 +0000 (14:37 -0500)]
Update prefixed attribute for Power10.

This patch creates a new attribute, "maybe_prefixed", which is used to mark
those instructions that may have a prefixed form. The existing "prefixed"
attribute is now used to mark all instructions that are prefixed form.

2021-03-31  Pat Haugen  <pthaugen@linux.ibm.com>

gcc/
PR target/99133
* config/rs6000/altivec.md (xxspltiw_v4si, xxspltiw_v4sf_inst,
xxspltidp_v2df_inst, xxsplti32dx_v4si_inst, xxsplti32dx_v4sf_inst,
xxblend_<mode>, xxpermx_inst, xxeval): Mark prefixed.
* config/rs6000/mma.md (mma_<vvi4i4i8>, mma_<avvi4i4i8>,
mma_<vvi4i4i2>, mma_<avvi4i4i2>, mma_<vvi4i4>, mma_<avvi4i4>,
mma_<pvi4i2>, mma_<apvi4i2>, mma_<vvi4i4i4>, mma_<avvi4i4i4>):
Likewise.
* config/rs6000/rs6000.c (rs6000_final_prescan_insn): Adjust test.
* config/rs6000/rs6000.md (define_attr "maybe_prefixed"): New.
(define_attr "prefixed"): Update initializer.

3 years agodwarf2out: Fix up ranges for -gdwarf-5 -gsplit-dwarf [PR99490]
Jakub Jelinek [Wed, 31 Mar 2021 19:25:58 +0000 (21:25 +0200)]
dwarf2out: Fix up ranges for -gdwarf-5 -gsplit-dwarf [PR99490]

For -gdwarf-4 -gsplit-dwarf we used to emit .debug_ranges section
(so in the binaries/shared libraries) with DW_AT_ranges from skeleton
units as well as .debug_info.dwo pointing to it through DW_FORM_sec_offset
(and DW_AT_GNU_ranges_base pointing into section, not sure for what
reason exactly).
When DWARF5 support was being added, we've started using .debug_rnglists
section, added DW_AT_rnglists_base to the DW_TAG_skeleton_unit, kept
DW_AT_ranges with DW_FORM_sec_offset in the skeleton and switched
over to DW_FORM_rnglistx for DW_AT_ranges in .debug_info.dwo.
But the DWARF5 spec actually means for the ranges section (at least
everything for those DW_AT_ranges in .debug_info.dwo) to sit
in .debug_rnglists.dwo section next to the .debug_info.dwo, rather than
having consumers look it up in the binary/shared library instead.
Based on some discussions in the DWARF discuss mailing list:
http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2021-March/thread.html#4765
this patch mostly follows what LLVM emits for that right now:
1) small .debug_rnglists section (when needed) just to cover the
   skeleton DW_AT_ranges (if present); the content of the section
   uses the Split DWARFy DW_RLE_* codes with addrx encodings where
   possible
2) DW_AT_ranges in the skeleton uses DW_FORM_sec_offset (difference
   from LLVM which uses DW_FORM_rnglistx, which makes it larger
   and ambiguous)
3) DW_AT_rnglists_base attribute is gone from the skeleton (again,
   unlike LLVM where it is just confusing what exactly it means because
   it is inherited; it would make sense if we emitted DW_FORM_rnglistx
   in non-split DWARF, but unless ranges are shared, I'm afraid we'd
   make DWARF larger with fewer relocations by that)
4) usually big .debug_rnglists.dwo section again with using DW_RLE_*x*
   where possible
5) DW_AT_ranges with DW_FORM_rnglistx from .debug_info.dwo referring to
   that .debug_rnglists.dwo ranges

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

PR debug/99490
* dwarf2out.c (debug_ranges_dwo_section): New variable.
(DW_RANGES_IDX_SKELETON): Define.
(struct dw_ranges): Add begin_entry and end_entry members.
(DEBUG_DWO_RNGLISTS_SECTION): Define.
(add_ranges_num): Adjust r initializer for addition of *_entry
members.
(add_ranges_by_labels): For -gsplit-dwarf and force_direct,
set idx to DW_RANGES_IDX_SKELETON.
(use_distinct_base_address_for_range): New function.
(index_rnglists): Don't set r->idx if it is equal to
DW_RANGES_IDX_SKELETON.  Initialize r->begin_entry and
r->end_entry for -gsplit-dwarf if those will be needed by
output_rnglists.
(output_rnglists): Add DWO argument.  If true, switch to
debug_ranges_dwo_section rather than debug_ranges_section.
Adjust l1/l2 label indexes.  Only output the offset table when
dwo is true and don't include in there the skeleton range
entry if present.  For -gsplit-dwarf, skip ranges that belong
to the other rnglists section.  Change return type from void
to bool and return true if there are any range entries for
the other section.  For dwarf_split_debug_info use
DW_RLE_startx_endx, DW_RLE_startx_length and DW_RLE_base_addressx
entries instead of DW_RLE_start_end, DW_RLE_start_length and
DW_RLE_base_address.  Use use_distinct_base_address_for_range.
(init_sections_and_labels): Initialize debug_ranges_dwo_section
if -gsplit-dwarf and DWARF >= 5.  Adjust ranges_section_label
and range_base_label indexes.
(dwarf2out_finish): Call index_rnglists earlier before finalizing
.debug_addr.  Never emit DW_AT_rnglists_base attribute.  For
-gsplit-dwarf and DWARF >= 5 call output_rnglists up to twice
with different dwo arguments.
(dwarf2out_c_finalize): Clear debug_ranges_dwo_section.

3 years agoimprove future::poll calibration loop
Alexandre Oliva [Wed, 31 Mar 2021 18:34:47 +0000 (15:34 -0300)]
improve future::poll calibration loop

The calibration loop I've recently added to the libstdc++
future/members/poll.cc tests could still select iteration counts that
might yield zero-time measurements for the wait_for when ready loop.

Waiting for a future that has already had a value set is presumably
uniformly faster than a zero-timed wait for a result, so I've changed
the calibration loop to use the former.

We might still be unlucky and get nonzero from the initial loop, so
that the calibration is skipped altogether, but then get zero from the
later when-ready loop.  I'm not dealing with this case in this patch.

for  libstdc++-v3/ChangeLog

* testsuite/30_threads/future/members/poll.cc: Use faster
after-ready call in the calibration loop.

3 years agogimple-fold: Recompute ADDR_EXPR flags after folding a TMR [PR98268]
Richard Sandiford [Wed, 31 Mar 2021 18:34:01 +0000 (19:34 +0100)]
gimple-fold: Recompute ADDR_EXPR flags after folding a TMR [PR98268]

The gimple verifier picked up that an ADDR_EXPR of a MEM_REF was not
marked TREE_CONSTANT even though the address was in fact invariant.
This came from folding a &TARGET_MEM_REF with constant operands to
a &MEM_REF; &TARGET_MEM_REF is never treated as TREE_CONSTANT
but &MEM_REF can be.

gcc/
PR tree-optimization/98268
* gimple-fold.c (maybe_canonicalize_mem_ref_addr): Call
recompute_tree_invariant_for_addr_expr after successfully
folding a TARGET_MEM_REF that occurs inside an ADDR_EXPR.

gcc/testsuite/
PR tree-optimization/98268
* gcc.target/aarch64/sve/pr98268-1.c: New test.
* gcc.target/aarch64/sve/pr98268-2.c: Likewise.

3 years agodata-ref: Tighten index-based alias checks [PR99726]
Richard Sandiford [Wed, 31 Mar 2021 18:34:01 +0000 (19:34 +0100)]
data-ref: Tighten index-based alias checks [PR99726]

create_intersect_range_checks_index tries to create a runtime
alias check based on index comparisons.  It looks through the
access functions for the two DRs to find a SCEV for the loop
that is being versioned and converts a DR_STEP-based check
into an index-based check.

However, there isn't any reliable sign information in the types,
so the code expects the value of the IV step (when interpreted as
signed) to be negative iff the DR_STEP (when interpreted as signed)
is negative.

r10-4762 added another assert related to this assumption and the
assert fired for the testcase in the PR.  The sign of the IV step
didn't match the sign of the DR_STEP.

I think this is actually showing what was previously a wrong-code bug.
The signs didn't match because the DRs contained *two* access function
SCEVs for the loop being versioned.  It doesn't look like the code
is set up to deal with this, since it checks each access function
independently and treats it as the sole source of DR_STEP.

The patch therefore moves the main condition out of the loop.
This also has the advantage of not building a tree for one access
function only to throw it away if we find an inner function that
makes the comparison invalid.

gcc/
PR tree-optimization/99726
* tree-data-ref.c (create_intersect_range_checks_index): Bail
out if there is more than one access function SCEV for the loop
being versioned.

gcc/testsuite/
PR tree-optimization/99726
* gcc.target/i386/pr99726.c: New test.

3 years agoHandle CONST_POLY_INTs in CONST_VECTORs [PR97141, PR98726]
Richard Sandiford [Wed, 31 Mar 2021 18:34:00 +0000 (19:34 +0100)]
Handle CONST_POLY_INTs in CONST_VECTORs [PR97141, PR98726]

This PR is caused by POLY_INT_CSTs being (necessarily) valid
in tree-level VECTOR_CSTs but CONST_POLY_INTs not being valid
in RTL CONST_VECTORs.  I can't tell/remember how deliberate
that was, but I'm guessing not very.  In particular,
valid_for_const_vector_p was added to guard against symbolic
constants rather than CONST_POLY_INTs.

I did briefly consider whether we should maintain the current
status anyway.  However, that would then require a way of
constructing variable-length vectors from individiual elements
if, say, we have:

   { [2, 2], [3, 2], [4, 2], â€¦ }

So I'm chalking this up to an oversight.  I think the intention
(and certainly the natural thing) is to have the same rules for
both trees and RTL.

The SVE CONST_VECTOR code should already be set up to handle
CONST_POLY_INTs.  However, we need to add support for Advanced SIMD
CONST_VECTORs that happen to contain SVE-based values.  The patch does
that by expanding such CONST_VECTORs in the same way as variable vectors.

gcc/
PR rtl-optimization/97141
PR rtl-optimization/98726
* emit-rtl.c (valid_for_const_vector_p): Return true for
CONST_POLY_INT_P.
* rtx-vector-builder.h (rtx_vector_builder::step): Return a
poly_wide_int instead of a wide_int.
(rtx_vector_builder::apply_set): Take a poly_wide_int instead
of a wide_int.
* rtx-vector-builder.c (rtx_vector_builder::apply_set): Likewise.
* config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Return
false for CONST_VECTORs that cannot be forced to memory.
* config/aarch64/aarch64-simd.md (mov<mode>): If a CONST_VECTOR
is too complex to force to memory, build it up from individual
elements instead.

gcc/testsuite/
PR rtl-optimization/97141
PR rtl-optimization/98726
* gcc.c-torture/compile/pr97141.c: New test.
* gcc.c-torture/compile/pr98726.c: Likewise.
* gcc.target/aarch64/sve/pr97141.c: Likewise.
* gcc.target/aarch64/sve/pr98726.c: Likewise.

3 years agoFix overvactive check in cgraph_node::release_body
Jan Hubicka [Wed, 31 Mar 2021 18:10:31 +0000 (20:10 +0200)]
Fix overvactive check in cgraph_node::release_body

gcc/ChangeLog:

PR lto/99447
* cgraph.c (cgraph_node::release_body): Fix overactive check.

3 years agoPR middle-end/65182 - -Wuninitialized fails when pointer to variable later passed...
Martin Sebor [Wed, 31 Mar 2021 16:39:24 +0000 (10:39 -0600)]
PR middle-end/65182 - -Wuninitialized fails when pointer to variable later passed to function

gcc/testsuite:
PR middle-end/65182
* gcc.dg/uninit-pr65182.c: New test.

3 years agoc++: Alias template in pack expansion [PR99445]
Jason Merrill [Wed, 31 Mar 2021 00:31:18 +0000 (20:31 -0400)]
c++: Alias template in pack expansion [PR99445]

In this testcase, iterative_hash_template_arg checks
alias_template_specialization_p to determine whether to treat a type as a
dependent alias, and structural_comptypes checks
dependent_alias_template_spec_p.  Normally that difference isn't a problem
because canonicalizing template arguments strips non-dependent aliases, but
that wasn't happening for the pack expansion.  Fixed thus.

gcc/cp/ChangeLog:

PR c++/99445
* tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.

gcc/testsuite/ChangeLog:

PR c++/99445
* g++.dg/cpp0x/alias-decl-variadic1.C: New test.

3 years agotestsuite/aarch64: Skip SLP diagnostic under ILP32 (PR target/96974)
Christophe Lyon [Mon, 29 Mar 2021 11:36:41 +0000 (11:36 +0000)]
testsuite/aarch64: Skip SLP diagnostic under ILP32 (PR target/96974)

The vectorizer has a very different effect with -mabi=ilp32, and
doesn't emit the expecte diagnostic, so this patch expects it only
under lp64.

2021-03-29  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/testsuite/
PR target/96974
* g++.target/aarch64/sve/pr96974.C: Expect SLP diagnostic only
under lp64.

3 years agoarm: Fix mult autovectorization patterm for iwmmxt (PR target/99786)
Christophe Lyon [Mon, 29 Mar 2021 12:41:08 +0000 (12:41 +0000)]
arm: Fix mult autovectorization patterm for iwmmxt (PR target/99786)

Similarly to other recently-added autovectorization patterns, mult has
been erroneously enabled for iwmmxt. However, V4HI and V2SI modes are
supported, so we make an exception for them.

The new testcase is derived from gcc.dg/ubsan/pr79904.c, with
additional modes added.

I kept dg-do compile because 'assemble' results in error messages from
the assembler, which are not related to this PR:

Error: selected processor does not support `tmcrr wr0,r4,r5' in ARM mode
Error: selected processor does not support `wstrd wr0,[r0]' in ARM mode
Error: selected processor does not support `wldrd wr0,[r0]' in ARM mode
Error: selected processor does not support `wldrd wr2,.L5' in ARM mode
Error: selected processor does not support `wmulul wr0,wr0,wr2' in ARM mode
Error: selected processor does not support `wstrd wr0,[r0]' in ARM mode
Error: selected processor does not support `wldrd wr0,[r0]' in ARM mode
Error: selected processor does not support `wldrd wr2,.L8' in ARM mode
Error: selected processor does not support `wmulwl wr0,wr0,wr2' in ARM mode
Error: selected processor does not support `wstrd wr0,[r0]' in ARM mode

2021-03-29  Christophe Lyon  <christophe.lyon@linaro.org>

PR target/99786

gcc/
* config/arm/vec-common.md (mul<mode>3): Disable on iwMMXT, expect
for V4HI and V2SI.

gcc/testsuite/
* gcc.target/arm/pr99786.c: New test.

3 years agox86: Update memcpy/memset inline strategies for Ice Lake
H.J. Lu [Fri, 22 Jan 2021 02:51:35 +0000 (18:51 -0800)]
x86: Update memcpy/memset inline strategies for Ice Lake

Simply memcpy and memset inline strategies to avoid branches for
-mtune=icelake:

1. With MOVE_RATIO and CLEAR_RATIO == 17, GCC will use integer/vector
   load and store for up to 16 * 16 (256) bytes when the data size is
   fixed and known.
2. Inline only if data size is known to be <= 256.
   a. Use "rep movsb/stosb" with simple code sequence if the data size
      is a constant.
   b. Use loop if data size is not a constant.
3. Use memcpy/memset libray function if data size is unknown or > 256.

On Ice Lake processor with -march=native -Ofast -flto,

1.  Performance impacts of SPEC CPU 2017 rate are:

500.perlbench_r -0.93%
502.gcc_r        0.36%
505.mcf_r        0.31%
520.omnetpp_r   -0.07%
523.xalancbmk_r -0.53%
525.x264_r      -0.09%
531.deepsjeng_r -0.19%
541.leela_r      0.16%
548.exchange2_r  0.22%
557.xz_r        -1.64%
Geomean         -0.24%

503.bwaves_r    -0.01%
507.cactuBSSN_r  0.00%
508.namd_r       0.12%
510.parest_r     0.07%
511.povray_r     0.29%
519.lbm_r        0.00%
521.wrf_r       -0.38%
526.blender_r    0.16%
527.cam4_r       0.18%
538.imagick_r    0.76%
544.nab_r       -0.84%
549.fotonik3d_r -0.07%
554.roms_r      -0.01%
Geomean          0.02%

2. Significant impacts on eembc benchmarks are:

eembc/nnet_test      9.90%
eembc/mp2decoddata2  16.42%
eembc/textv2data3   -4.86%
eembc/qos            12.90%

gcc/

* config/i386/i386-expand.c (expand_set_or_cpymem_via_rep):
For TARGET_PREFER_KNOWN_REP_MOVSB_STOSB, don't convert QImode
to SImode.
(decide_alg): For TARGET_PREFER_KNOWN_REP_MOVSB_STOSB, use
"rep movsb/stosb" only for known sizes.
* config/i386/i386-options.c (processor_cost_table): Use Ice
Lake cost for Cannon Lake, Ice Lake, Tiger Lake, Sapphire
Rapids and Alder Lake.
* config/i386/i386.h (TARGET_PREFER_KNOWN_REP_MOVSB_STOSB): New.
* config/i386/x86-tune-costs.h (icelake_memcpy): New.
(icelake_memset): Likewise.
(icelake_cost): Likewise.
* config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB):
New.

gcc/testsuite/

* gcc.target/i386/memcpy-strategy-5.c: New test.
* gcc.target/i386/memcpy-strategy-6.c: Likewise.
* gcc.target/i386/memcpy-strategy-7.c: Likewise.
* gcc.target/i386/memcpy-strategy-8.c: Likewise.
* gcc.target/i386/memset-strategy-3.c: Likewise.
* gcc.target/i386/memset-strategy-4.c: Likewise.
* gcc.target/i386/memset-strategy-5.c: Likewise.
* gcc.target/i386/memset-strategy-6.c: Likewise.

3 years agoaarch64: Fix target alignment for SVE [PR98119]
Richard Sandiford [Wed, 31 Mar 2021 10:26:06 +0000 (11:26 +0100)]
aarch64: Fix target alignment for SVE [PR98119]

The vectoriser supports peeling for alignment using predication:
we move back to the previous aligned boundary and make the skipped
elements inactive in the first loop iteration.  As it happens,
the costs for existing CPUs give an equal cost to aligned and
unaligned accesses, so this feature is rarely used.

However, the PR shows that when the feature was forced on, we were
still trying to align to a full-vector boundary even when using
partial vectors.

gcc/
PR target/98119
* config/aarch64/aarch64.c
(aarch64_vectorize_preferred_vector_alignment): Query the size
of the provided SVE vector; do not assume that all SVE vectors
have the same size.

gcc/testsuite/
PR target/98119
* gcc.target/aarch64/sve/pr98119.c: New test.

3 years agoSmall refactoring of cgraph_node::release_body
Jan Hubicka [Wed, 31 Mar 2021 09:35:29 +0000 (11:35 +0200)]
Small refactoring of cgraph_node::release_body

PR lto/99447
* cgraph.c (cgraph_node::release_body): Remove all callers and
references.
* cgraphclones.c (cgraph_node::materialize_clone): Do not do it here.
* cgraphunit.c (cgraph_node::expand): And here.

3 years agoFix coding style in IPA modref.
Martin Liska [Wed, 31 Mar 2021 08:51:11 +0000 (10:51 +0200)]
Fix coding style in IPA modref.

gcc/ChangeLog:

* ipa-modref.c (analyze_ssa_name_flags): Fix coding style
and one negated condition.

3 years agoaarch64: Fix up *add<mode>3_poly_1 [PR99813]
Jakub Jelinek [Wed, 31 Mar 2021 08:46:01 +0000 (10:46 +0200)]
aarch64: Fix up *add<mode>3_poly_1 [PR99813]

As mentioned in the PR, Uai constraint stands for
aarch64_sve_scalar_inc_dec_immediate
while Uav for
aarch64_sve_addvl_addpl_immediate.
Both *add<mode>3_aarch64 and *add<mode>3_poly_1 patterns use
  * return aarch64_output_sve_scalar_inc_dec (operands[2]);
  * return aarch64_output_sve_addvl_addpl (operands[2]);
in that order, but the former with Uai,Uav order, while the
latter with Uav,Uai instead.  This patch swaps the constraints
so that they match the output.

Co-authored-by: Richard Sandiford <richard.sandiford@arm.com>
2021-03-31  Jakub Jelinek  <jakub@redhat.com>
    Richard Sandiford  <richard.sandiford@arm.com>

PR target/99813
* config/aarch64/aarch64.md (*add<mode>3_poly_1): Swap Uai and Uav
constraints on operands[2] and similarly 0 and rk constraints
on operands[1] corresponding to that.

* g++.target/aarch64/sve/pr99813.C: New test.

3 years agoi386, debug: Default to -gdwarf-4 on Windows targets with broken ld.bfd [PR98860]
Jakub Jelinek [Wed, 31 Mar 2021 07:11:29 +0000 (09:11 +0200)]
i386, debug: Default to -gdwarf-4 on Windows targets with broken ld.bfd [PR98860]

As mentioned in the PR, before the
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba6eb62ff0ea9843a018cfd7cd06777bd66ae0a0
fix from March 1st, PECOFF ld.bfd didn't know about .debug_loclists,
.debug_rnglists and other debug sections new in DWARF 5.  Unfortunately,
unlike for ELF linkers, that means the sections were placed in wrong
ordering with wrong VMA/LMA, so the resulting executables are apparently
unusable.

As that is pretty new change, newer than 2.35.2 or 2.36 binutils releases,
the following patch adds a workaround that turns -gdwarf-4 by default
instead of -gdwarf-5 if a broken linker is found at configure time.
Users can still explicitly play with -gdwarf-5 and either use a non-broken
linker or use custom linker scripts for the broken one, but at least
by default it should work.

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

PR bootstrap/98860
* configure.ac (HAVE_LD_BROKEN_PE_DWARF5): New AC_DEFINE if PECOFF
linker doesn't support DWARF sections new in DWARF5.
* config/i386/i386-options.c (ix86_option_override_internal): Default
to dwarf_version 4 if HAVE_LD_BROKEN_PE_DWARF5 for TARGET_PECOFF
targets.
* config.in: Regenerated.
* configure: Regenerated.

3 years agotestsuite: Disable zero-scratch-regs-{8, 9, 10, 11}.c on all but ... [PR97680]
Jakub Jelinek [Wed, 31 Mar 2021 06:55:38 +0000 (08:55 +0200)]
testsuite: Disable zero-scratch-regs-{8, 9, 10, 11}.c on all but ... [PR97680]

Seems the target hook is only defined on
config/i386/i386.c:#undef TARGET_ZERO_CALL_USED_REGS
config/i386/i386.c:#define TARGET_ZERO_CALL_USED_REGS ix86_zero_call_used_regs
config/sparc/sparc.c:#undef TARGET_ZERO_CALL_USED_REGS
config/sparc/sparc.c:#define TARGET_ZERO_CALL_USED_REGS sparc_zero_call_used_regs
but apparently many of the tests actually succeed on various targets that
don't define those hooks.  E.g. I haven't seen them to fail on aarch64,
on arm only the -10.c fails, on powerpc*/s390* all {8,9,10,11} fail (plus
5 is skipped on power*-aix*).
On ia64 according to testresults {6,7,8,9,10,11} fail, some with ICEs.
On mipsel according to testresults {9,10,11} fail, some with ICEs.
On nvptx at least 1-9 succeed, 10-11 don't know, don't have assert.h around.

I've kept {5,6,7} with aix,ia64,ia64 skipped because those seems like
outliers, it works pretty much everywhere but on those.
The rest have known good targets.

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

PR testsuite/97680
* c-c++-common/zero-scratch-regs-6.c: Skip on ia64.
* c-c++-common/zero-scratch-regs-7.c: Likewise.
* c-c++-common/zero-scratch-regs-8.c: Change from dg-skip-if of
selected unsupported triplets to all targets but selected triplets
of supported targets.
* c-c++-common/zero-scratch-regs-9.c: Likewise.
* c-c++-common/zero-scratch-regs-10.c: Likewise.
* c-c++-common/zero-scratch-regs-11.c: Likewise.

3 years agoc++: Adjust mangling of __alignof__ [PR88115]
Patrick Palka [Wed, 31 Mar 2021 02:57:11 +0000 (22:57 -0400)]
c++: Adjust mangling of __alignof__ [PR88115]

r11-4926 made __alignof__ get mangled differently from alignof,
encoding __alignof__ as a vendor extended operator.  But this
mangling is problematic for the reasons mentioned in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88115#c6.

This patch changes our mangling of __alignof__ to instead use the
new "vendor extended expression" syntax that's proposed in
https://github.com/itanium-cxx-abi/cxx-abi/issues/112.  Clang does
the same thing already, so after this patch Clang and GCC agree
about the mangling of __alignof__(type) and __alignof__(expr).

gcc/cp/ChangeLog:

PR c++/88115
* mangle.c (write_expression): Adjust the mangling of
__alignof__.

include/ChangeLog:

PR c++/88115
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_VENDOR_EXPR.

libiberty/ChangeLog:

PR c++/88115
* cp-demangle.c (d_dump, d_make_comp, d_expression_1)
(d_count_templates_scopes): Handle DEMANGLE_COMPONENT_VENDOR_EXPR.
(d_print_comp_inner): Likewise.
<case DEMANGLE_COMPONENT_EXTENDED_OPERATOR>: Revert r11-4926
change.
<case DEMANGLE_COMPONENT_UNARY>: Likewise.
* testsuite/demangle-expected: Adjust __alignof__ tests.

gcc/testsuite/ChangeLog:

PR c++/88115
* g++.dg/cpp0x/alignof7.C: Adjust expected mangling.

3 years agoc++: placeholder type constraint and argument pack [PR99815]
Patrick Palka [Wed, 31 Mar 2021 02:54:37 +0000 (22:54 -0400)]
c++: placeholder type constraint and argument pack [PR99815]

When checking dependence of a placeholder type constraint, if the first
template argument of the constraint is an argument pack, we need to
expand it in order to properly separate the implicit 'auto' argument
from the rest.

gcc/cp/ChangeLog:

PR c++/99815
* pt.c (placeholder_type_constraint_dependent_p): Expand
argument packs to separate the first non-pack argument
from the rest.

gcc/testsuite/ChangeLog:

PR c++/99815
* g++.dg/cpp2a/concepts-placeholder5.C: New test.

3 years agoDaily bump.
GCC Administrator [Wed, 31 Mar 2021 00:16:31 +0000 (00:16 +0000)]
Daily bump.

3 years agoanalyzer: remove old decl of region::dump_to_pp
David Malcolm [Fri, 26 Mar 2021 22:54:18 +0000 (18:54 -0400)]
analyzer: remove old decl of region::dump_to_pp

This was made redundant in the GCC 11 rewrite of state
(808f4dfeb3a95f50f15e71148e5c1067f90a126d).

gcc/analyzer/ChangeLog:
* region.h (region::dump_to_pp): Remove old decl.

3 years agoanalyzer: only call get_diagnostic_tree when it's needed
David Malcolm [Fri, 26 Mar 2021 17:26:15 +0000 (13:26 -0400)]
analyzer: only call get_diagnostic_tree when it's needed

impl_sm_context::get_diagnostic_tree could be expensive, and
I find myself needing to put a breakpoint on it to debug
PR analyzer/99771, so only call it if we're about to use
the result.

gcc/analyzer/ChangeLog:
* sm-file.cc (fileptr_state_machine::on_stmt): Only call
get_diagnostic_tree if the result will be used.
* sm-malloc.cc (malloc_state_machine::on_stmt): Likewise.
(malloc_state_machine::on_deallocator_call): Likewise.
(malloc_state_machine::on_realloc_call): Likewise.
(malloc_state_machine::on_realloc_call): Likewise.
* sm-sensitive.cc
(sensitive_state_machine::warn_for_any_exposure): Likewise.
* sm-taint.cc (taint_state_machine::on_stmt): Likewise.

3 years agoanalyzer testsuite: fix typo
David Malcolm [Thu, 25 Mar 2021 01:08:04 +0000 (21:08 -0400)]
analyzer testsuite: fix typo

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/symbolic-1.c: Fix typo.

3 years agoc++: duplicate const static members [PR 99283]
Nathan Sidwell [Tue, 30 Mar 2021 16:45:59 +0000 (09:45 -0700)]
c++: duplicate const static members [PR 99283]

This is the bug that keeps on giving.  Reducing it has been successful
at hitting other defects. In this case, some more specialization hash
table fun, plus an issue with reading in a definition of a duplicated
declaration.  At least I discovered a null context check is no longer
needed.

PR c++/99283
gcc/cp/
* module.cc (dumper::operator): Make less brittle.
(trees_out::core_bools): VAR_DECLs always have a context.
(trees_out::key_mergeable): Use same_type_p for asserting.
(trees_in::read_var_def): Propagate
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
gcc/testsuite/
* g++.dg/modules/pr99283-5.h: New.
* g++.dg/modules/pr99283-5_a.H: New.
* g++.dg/modules/pr99283-5_b.H: New.
* g++.dg/modules/pr99283-5_c.C: New.

3 years agoc++: Fix ICE on PTRMEM_CST in lambda in inline var initializer [PR99790]
Jakub Jelinek [Tue, 30 Mar 2021 16:15:32 +0000 (18:15 +0200)]
c++: Fix ICE on PTRMEM_CST in lambda in inline var initializer [PR99790]

The following testcase ICEs (since the addition of inline var support),
because the lambda contains PTRMEM_CST but finish_function is called for the
lambda quite early during parsing it (from finish_lambda_function) when
the containing class is still incomplete.  That means that during
genericization cplus_expand_constant keeps the PTRMEM_CST unmodified, but
later nothing lowers it when the class is finalized.
Using sizeof etc. on the class in such contexts is rejected by both g++ and
clang++, and when the PTRMEM_CST appears e.g. in static var initializers
rather than in functions, we handle it correctly because c_parse_final_cleanups
-> lower_var_init will handle those cplus_expand_constant when all classes
are already finalized.

The following patch fixes it by calling cplus_expand_constant again during
gimplification, as we are now unconditionally unit at a time, I'd think
everything that could be completed will be before we start gimplification.

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

PR c++/99790
* cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.

* g++.dg/cpp1z/pr99790.C: New test.

3 years agoaarch64: PR target/99820: Guard on available SVE issue info before using
Kyrylo Tkachov [Tue, 30 Mar 2021 15:42:17 +0000 (16:42 +0100)]
aarch64: PR target/99820: Guard on available SVE issue info before using

This fixes a simple segfault ICE when using the use_new_vector_costs tunable with a CPU tuning that it wasn't intended for.
I'm not adding a testcase here as we intend to remove the tunable for GCC 12 anyway (the new costing logic will remain and will benefit
from this extra check, but the -moverride option will no longer exist).

gcc/ChangeLog:

PR target/99820
* config/aarch64/aarch64.c (aarch64_analyze_loop_vinfo): Check for
available issue_info before using it.

3 years agoaarch64: PR target/99822 Don't allow zero register in first operand of SUBS/ADDS...
Kyrylo Tkachov [Tue, 30 Mar 2021 14:43:36 +0000 (15:43 +0100)]
aarch64: PR target/99822 Don't allow zero register in first operand of SUBS/ADDS-immediate

In this PR we end up generating an invalid instruction:
adds x1,xzr,#2

because the pattern accepts zero as an operand in the comparison, but the instruction doesn't.
Fix it by adjusting the predicate and constraints.

gcc/ChangeLog:

PR target/99822
* config/aarch64/aarch64.md (sub<mode>3_compare1_imm): Do not allow zero
in operand 1.

gcc/testsuite/ChangeLog:

PR target/99822
* gcc.c-torture/compile/pr99822.c: New test.

3 years agors6000: Enable 32bit variable vec_insert [PR99718]
luoxhu@cn.ibm.com [Sat, 27 Mar 2021 03:26:57 +0000 (22:26 -0500)]
rs6000: Enable 32bit variable vec_insert [PR99718]

32bit and P7 VSX could also benefit a lot from the variable vec_insert
implementation with shift/insert/shift back method.

2011-03-29  Xionghu Luo  <luoxhu@linux.ibm.com>

PR target/99718
* config/rs6000/altivec.md (altivec_lvsl_reg): Change to ...
(altivec_lvsl_reg_<mode>): ... this.
(altivec_lvsr_reg): Change to ...
(altivec_lvsr_reg_<mode>): ... this.
* config/rs6000/predicates.md (vec_set_index_operand): New.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Enable 32bit variable vec_insert for all TARGET_VSX.
* config/rs6000/rs6000.c (rs6000_expand_vector_set_var_p9):
Enable 32bit variable vec_insert for p9 and above.
(rs6000_expand_vector_set_var_p8): Rename to ...
(rs6000_expand_vector_set_var_p7): ... this.
(rs6000_expand_vector_set): Use TARGET_VSX and adjust assert
position.
* config/rs6000/vector.md (vec_set<mode>): Use vec_set_index_operand.
* config/rs6000/vsx.md (xl_len_r): Use gen_altivec_lvsl_reg_di and
gen_altivec_lvsr_reg_di.

gcc/testsuite/
PR target/99718
* gcc.target/powerpc/fold-vec-insert-char-p8.c: Update
instruction counts.
* gcc.target/powerpc/fold-vec-insert-char-p9.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-double.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-float-p8.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-float-p9.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-int-p8.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-longlong.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-short-p8.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-short-p9.c: Likewise.
* gcc.target/powerpc/pr79251.p8.c: Likewise.
* gcc.target/powerpc/pr79251.p9.c: Likewise.
* gcc.target/powerpc/vsx-builtin-7.c: Likewise.
* gcc.target/powerpc/pr79251-run.p7.c: New test.
* gcc.target/powerpc/pr79251.p7.c: New test.

3 years agox86: Define __rdtsc and __rdtscp as macros
H.J. Lu [Wed, 24 Mar 2021 03:04:58 +0000 (20:04 -0700)]
x86: Define __rdtsc and __rdtscp as macros

Define __rdtsc and __rdtscp as macros for callers with general-regs-only
target attribute to avoid inline failure with always_inline attribute.

gcc/

PR target/99744
* config/i386/ia32intrin.h (__rdtsc): Defined as macro.
(__rdtscp): Likewise.

gcc/testsuite/

PR target/99744
* gcc.target/i386/pr99744-1.c: New test.

3 years agoslp: reject non-multiple of 2 laned SLP trees (PR99825)
Tamar Christina [Tue, 30 Mar 2021 13:16:03 +0000 (14:16 +0100)]
slp: reject non-multiple of 2 laned SLP trees (PR99825)

TWO_OPERANDS allows any order or number of combinations of + and - operations
but the pattern matcher only supports pairs of operations.

This patch has the pattern matcher for complex numbers reject SLP trees where
the lanes are not a multiple of 2.

gcc/ChangeLog:

PR tree-optimization/99825
* tree-vect-slp-patterns.c (vect_check_evenodd_blend):
Reject non-mult 2 lanes.

gcc/testsuite/ChangeLog:

PR tree-optimization/99825
* gfortran.dg/vect/pr99825.f90: New test.

3 years agoarm: Fix emission of Tag_ABI_VFP_args with MVE and -mfloat-abi=hard (PR target/99773)
Christophe Lyon [Tue, 30 Mar 2021 12:26:33 +0000 (12:26 +0000)]
arm: Fix emission of Tag_ABI_VFP_args with MVE and -mfloat-abi=hard (PR target/99773)

When compiling with -mfloat-abi=hard -march=armv8.1-m.main+mve, we
want to emit Tag_ABI_VFP_args even though we are not emitting
floating-point instructions (we need "+mve.fp" for that), because we
use MVE registers to pass FP arguments.

This patch removes the condition on (! TARGET_SOFT_FLOAT) because this
is a case where TARGET_SOFT_FLOAT is true, and TARGET_HARD_FLOAT_ABI
is true too.

2021-03-30  Richard Earnshaw  <rearnsha@arm.com>

gcc/
PR target/99773
* config/arm/arm.c (arm_file_start): Fix emission of
Tag_ABI_VFP_args attribute.

3 years agoaarch64: Fix gcc.target/aarch64/pr99808.c for ILP32
Kyrylo Tkachov [Tue, 30 Mar 2021 13:07:50 +0000 (14:07 +0100)]
aarch64: Fix gcc.target/aarch64/pr99808.c for ILP32

Fix test for -mabi=ilp32

gcc/testsuite/ChangeLog:

PR target/99808
* gcc.target/aarch64/pr99808.c: Use ULL constant suffix.

3 years agotree-optimization/99824 - avoid excessive integer type precision in VN
Richard Biener [Tue, 30 Mar 2021 09:22:52 +0000 (11:22 +0200)]
tree-optimization/99824 - avoid excessive integer type precision in VN

VN sometimes builds new integer types to handle accesss where precision
of the access type does not match the access size.  The way
ao_ref_init_from_vn_reference is computing the access size ignores
the access type in case the ref operands have an outermost
COMPONENT_REF which, in case it is an array for example, can be
way larger than the access size.  This can cause us to try
building an integer type with precision larger than WIDE_INT_MAX_PRECISION
eventually leading to memory corruption.

The following adjusts ao_ref_init_from_vn_reference to only lower
access sizes via the outermost COMPONENT_REF but otherwise honor
the access size as specified by the access type.

It also places an assert in integer type building that we remain
in the limits of WIDE_INT_MAX_PRECISION.  I chose the shared code
where we set TYPE_MIN/MAX_VALUE because that will immediately
cross the wide_ints capacity otherwise.

2021-03-30  Richard Biener  <rguenther@suse.de>

PR tree-optimization/99824
* stor-layout.c (set_min_and_max_values_for_integral_type):
Assert the precision is within the bounds of
WIDE_INT_MAX_PRECISION.
* tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
the outermost component ref only to lower the access size
and initialize that from the access type.

* gcc.dg/torture/pr99824.c: New testcase.

3 years agoaarch64: Tweak post-RA handling of CONST_INT moves [PR98136]
Richard Sandiford [Tue, 30 Mar 2021 10:42:50 +0000 (11:42 +0100)]
aarch64: Tweak post-RA handling of CONST_INT moves [PR98136]

This PR is a regression caused by r8-5967, where we replaced
a call to aarch64_internal_mov_immediate in aarch64_add_offset
with a call to aarch64_force_temporary, which in turn uses the
normal emit_move_insn{,_1} routines.

The problem is that aarch64_add_offset can be called while
outputting a thunk, where we require all instructions to be
valid without splitting.  However, the move expanders were
not splitting CONST_INT moves themselves.

I think the right fix is to make the move expanders work
even in this scenario, rather than require callers to handle
it as a special case.

gcc/
PR target/98136
* config/aarch64/aarch64.md (mov<mode>): Pass multi-instruction
CONST_INTs to aarch64_expand_mov_immediate when called after RA.

gcc/testsuite/
PR target/98136
* g++.dg/pr98136.C: New test.

3 years agoaarch64: Prevent use of SIMD fcvtz[su] instruction variant with "nosimd"
Mihailo Stojanovic [Tue, 30 Mar 2021 10:42:49 +0000 (11:42 +0100)]
aarch64: Prevent use of SIMD fcvtz[su] instruction variant with "nosimd"

Currently, SF->SI and DF->DI conversions on Aarch64 with the "nosimd"
flag provided sometimes cause the emitting of a vector variant of the
fcvtz[su] instruction (e.g. fcvtzu s0, s0).

This modifies the corresponding pattern to only select the vector
variant of the instruction when generating code with SIMD enabled.

gcc/ChangeLog:

* config/aarch64/aarch64.md
(<optab>_trunc<fcvt_target><GPI:mode>2): Set the "arch"
attribute to disambiguate between SIMD and FP variants of the
instruction.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/fcvt_nosimd.c: New test.

3 years agoDaily bump.
GCC Administrator [Tue, 30 Mar 2021 00:16:29 +0000 (00:16 +0000)]
Daily bump.

3 years agoUpdate cpplib sr.po.
Joseph Myers [Mon, 29 Mar 2021 22:53:22 +0000 (22:53 +0000)]
Update cpplib sr.po.

* sr.po: Update.

3 years agoUpdate gcc sv.po.
Joseph Myers [Mon, 29 Mar 2021 22:51:16 +0000 (22:51 +0000)]
Update gcc sv.po.

* sv.po: Update.

3 years agoFix wrong assignment of aggregate to full-access component
Eric Botcazou [Mon, 29 Mar 2021 22:41:46 +0000 (00:41 +0200)]
Fix wrong assignment of aggregate to full-access component

This is a regression present on the mainline: the compiler (front-end) fails
to assign an aggregate to a full-access component (i.e. Atomic or VFA) as a
whole if the type of the component is not full access itself.

gcc/ada/
PR ada/99802
* freeze.adb (Is_Full_Access_Aggregate): Call Is_Full_Access_Object
on the name of an N_Assignment_Statement to spot full access.

3 years agoPR tree-optimization/61869 - Spurious uninitialized warning
Martin Sebor [Mon, 29 Mar 2021 21:58:01 +0000 (15:58 -0600)]
PR tree-optimization/61869 - Spurious uninitialized warning

gcc/testsuite/ChangeLog:
PR tree-optimization/61869
* gcc.dg/uninit-pr61869.c: New test.

3 years agoPR tree-optimization/61677 - False positive with -Wmaybe-uninitialized
Martin Sebor [Mon, 29 Mar 2021 21:21:32 +0000 (15:21 -0600)]
PR tree-optimization/61677 - False positive with -Wmaybe-uninitialized

gcc/testsuite/ChangeLog:
PR tree-optimization/61677
* gcc.dg/uninit-pr61677.c: New test.

3 years agoRequire GLIBC 2.32 for Decimal/_Float128 conversions.
Michael Meissner [Mon, 29 Mar 2021 20:43:14 +0000 (16:43 -0400)]
Require GLIBC 2.32 for Decimal/_Float128 conversions.

In the patch that I applied on March 2nd, I had code to provide support for
Decimal/_Float128 conversions if the user did not use at least GLIBC 2.32.  It
did this by using __ibm128 as an intermediate type.  The trouble is __ibm128
cannot represent all of the numbers that _Float128 can, and you lose if you do
this conversion.

This patch removes this support.  The dfp-bit.c functions now call the the
__sprintfieee128 and __strtoieee128 functions to do the conversion.  If the
user does not have GLIBC, they will get a linker error that these functions do
not exist.

The float128 support functions are only built into the static libgcc, so there
isn't an issue with having references to __strtoieee128 and __sprintfieee128
with older GLIBC libraries.

As an added bonus, this patch eliminates the __sprintfkf function which
included stdio.h to get a definition for the sprintf library function.  This
allows for building cross compilers without having to have a target stdio.h
available.

libgcc/
2021-03-29  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/t-float128 (fp128_decstr_funcs): Delete.
(fp128_ppc_funcs): Do not add $(fp128_decstr_funcs).
(fp128_decstr_objs): Delete.
* dfp-bit.h: Call __sprintfieee128 to do conversions from
_Float128 to a Decimal type.  Call __strtoieee128 to do
conversions from a Decimal type to _Float128.
* config/rs6000/_sprintfkf.c: Delete file.
* config/rs6000/_sprintfkf.h: Delete file.
* config/rs6000/_strtokf.c: Delete file.
* config/rs6000/_strtokf.h: Delete file.

3 years agoPR tree-optimization/61112 - repeated conditional triggers false positive -Wmaybe...
Martin Sebor [Mon, 29 Mar 2021 19:52:53 +0000 (13:52 -0600)]
PR tree-optimization/61112 - repeated conditional triggers false positive -Wmaybe-uninitialized

gcc/testsuite/ChangeLog:
PR tree-optimization/61112
* gcc.dg/uninit-pr61112.c: New test.

3 years agoFix pr99751.c testcase
Jan Hubicka [Mon, 29 Mar 2021 18:59:42 +0000 (20:59 +0200)]
Fix pr99751.c testcase

PR ipa/99751
* gcc.c-torture/compile/pr99751.c: Rename from ...
* gcc.c-torture/execute/pr99751.c: ... to this.

3 years agoFix typo in merge_call_lhs_flags
Jan Hubicka [Mon, 29 Mar 2021 18:09:35 +0000 (20:09 +0200)]
Fix typo in merge_call_lhs_flags

gcc/ChangeLog:

2021-03-29  Jan Hubicka  <hubicka@ucw.cz>

* ipa-modref.c (merge_call_lhs_flags): Correct handling of deref.
(analyze_ssa_name_flags): Fix typo in comment.

gcc/testsuite/ChangeLog:

2021-03-29  Jan Hubicka  <hubicka@ucw.cz>

* gcc.c-torture/compile/pr99751.c: New test.