]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years agoc: Fix up cfun->function_end_locus from the C FE [PR94029]
Jakub Jelinek [Thu, 19 Mar 2020 21:56:20 +0000 (22:56 +0100)] 
c: Fix up cfun->function_end_locus from the C FE [PR94029]

On the following testcase we ICE because while
      DECL_STRUCT_FUNCTION (current_function_decl)->function_start_locus
        = c_parser_peek_token (parser)->location;
and similarly DECL_SOURCE_LOCATION (fndecl) is set from some token's
location, the end is set as:
  /* Store the end of the function, so that we get good line number
     info for the epilogue.  */
  cfun->function_end_locus = input_location;
and the thing is that input_location is only very rarely set in the C FE
(the primary spot that changes it is the cb_line_change/fe_file_change).
Which means, e.g. for pretty much all C functions that are on a single line,
function_start_locus column is > than function_end_locus column, and the
testcase even has smaller line in function_end_locus because cb_line_change
isn't performed while parsing multi-line arguments of a function-like macro.

Attached are two possible fixes to achieve what the C++ FE does, in
particular that cfun->function_end_locus is the locus of the closing } of
the function.  The first one updates input_location when we see a closing }
of a compound statement (though any, not just the function body) and thus
input_location in the finish_function call is what we need.
The second instead propagates the location_t from the parsing of the
outermost compound statement (the function body) to finish_function.
The second one is this version.

2020-03-19  Jakub Jelinek  <jakub@redhat.com>

PR gcov-profile/94029
* c-tree.h (finish_function): Add location_t argument defaulted to
input_location.
* c-parser.c (c_parser_compound_statement): Add endlocp argument and
set it to the locus of closing } if non-NULL.
(c_parser_compound_statement_nostart): Return locus of closing }.
(c_parser_parse_rtl_body): Likewise.
(c_parser_declaration_or_fndef): Propagate locus of closing } to
finish_function.
* c-decl.c (finish_function): Add end_loc argument, use it instead of
input_location to set function_end_locus.

* gcc.misc-tests/gcov-pr94029.c: New test.

5 years agoc++: Fix up handling of captured vars in lambdas in OpenMP clauses [PR93931]
Jakub Jelinek [Thu, 19 Mar 2020 11:22:47 +0000 (12:22 +0100)] 
c++: Fix up handling of captured vars in lambdas in OpenMP clauses [PR93931]

Without the parser.c change we were ICEing on the testcase, because while the
uses of the captured vars inside of the constructs were replaced with capture
proxy decls, we didn't do that for decls in OpenMP clauses.

With that fixed, we don't ICE anymore, but the testcase is miscompiled and FAILs
at runtime.  This is because the capture proxy decls have DECL_VALUE_EXPR and
during gimplification we were gimplifying those to their DECL_VALUE_EXPRs.
That is fine for shared vars, but for privatized ones we must not do that.
So that is what the cp-gimplify.c changes do.  Had to add a DECL_CONTEXT check
before calling is_capture_proxy because some VAR_DECLs don't have DECL_CONTEXT
set (yet) and is_capture_proxy relies on that being non-NULL always.

2020-03-19  Jakub Jelinek  <jakub@redhat.com>

PR c++/93931
* parser.c (cp_parser_omp_var_list_no_open): Call process_outer_var_ref
on outer_automatic_var_p decls.
* cp-gimplify.c (cxx_omp_disregard_value_expr): Return true also for
capture proxy decls.

* testsuite/libgomp.c++/pr93931.C: New test.

5 years agophiopt: Avoid -fcompare-debug bug in phiopt [PR94211]
Jakub Jelinek [Thu, 19 Mar 2020 09:24:16 +0000 (10:24 +0100)] 
phiopt: Avoid -fcompare-debug bug in phiopt [PR94211]

Two years ago, I've added support for up to 2 simple preparation statements
in value_replacement, but the
-      && estimate_num_insns (assign, &eni_time_weights)
+      && estimate_num_insns (bb_seq (middle_bb), &eni_time_weights)
change, meant that we compute the cost of all those statements rather than
just the single assign that has been the single supported non-debug
statement in the bb before, doesn't do what I thought would do, gimple_seq
is just gimple * and thus it can't be really overloaded depending on whether
we pass a single gimple * or a whole sequence.  Which means in the last
two years it doesn't count all the statements, but only the first one.
With -g that happens to be a DEBUG_STMT, or it could be e.g. the first
preparation statement which could be much cheaper than the actual assign.

2020-03-19  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/94211
* tree-ssa-phiopt.c (value_replacement): Use estimate_num_insns_seq
instead of estimate_num_insns for bb_seq (middle_bb).  Rename
emtpy_or_with_defined_p variable to empty_or_with_defined_p, adjust
all uses.

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

5 years agoc: Handle C_TYPE_INCOMPLETE_VARS even for ENUMERAL_TYPEs [PR94172]
Jakub Jelinek [Tue, 17 Mar 2020 21:32:34 +0000 (22:32 +0100)] 
c: Handle C_TYPE_INCOMPLETE_VARS even for ENUMERAL_TYPEs [PR94172]

The following testcases ICE, because they contain extern variable
declarations with incomplete enum types that is later completed and after
that those variables are accessed.  The ICEs are because the vars then may have
incorrect DECL_MODE etc., e.g. in the first case the var has SImode
DECL_MODE (the guessed mode for the enum), but the enum then actually has
DImode because its enumerators don't fit into unsigned int.

The following patch fixes it by using C_TYPE_INCOMPLETE_VARS not just on
incomplete struct/union types, but also incomplete enum types.
TYPE_VFIELD can't be used as it is TYPE_MIN_VALUE on ENUMERAL_TYPE,
thankfully TYPE_LANG_SLOT_1 has been used in the C FE only on
FUNCTION_TYPEs.

2020-03-17  Jakub Jelinek  <jakub@redhat.com>

PR c/94172
* c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
(TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
* c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
ENUMERAL_TYPEs.
(finish_incomplete_vars): New function, moved from finish_struct.  Use
relayout_decl instead of layout_decl.
(finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
being TYPE_VFIELD.  Use finish_incomplete_vars.
(finish_enum): Clear C_TYPE_INCOMPLETE_VARS.  Call
finish_incomplete_vars.
* c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
also on ENUMERAL_TYPEs.

* gcc.dg/pr94172-1.c: New test.
* gcc.dg/pr94172-2.c: New test.

5 years agoc++: Fix parsing of invalid enum specifiers [PR90995]
Jakub Jelinek [Tue, 17 Mar 2020 20:21:16 +0000 (21:21 +0100)] 
c++: Fix parsing of invalid enum specifiers [PR90995]

The testcase shows some accepts-invalid (the ones without alignas) and
ice-on-invalid-code (the ones with alignas) cases.
If the enum doesn't have an underlying type and is not a definition,
the caller retries to parse it as elaborated type specifier.
E.g. for enum struct S s it will then pedwarn that elaborated type specifier
shouldn't have the struct/class keywords.
The problem is if the enum specifier is not followed by { when it has
underlying type.  In that case we have already called
cp_parser_parse_definitely to end the tentative parsing started at the
beginning of cp_parser_enum_specifier.  But the
cp_parser_error (parser, "expected %<;%> or %<{%>");
doesn't emit any error because the whole function is called from yet another
tentative parse and the caller starts parsing the elaborated type
specifier where the cp_parser_enum_specifier stopped (i.e. after the
underlying type token(s)).  The ultimate caller than commits the tentative
parsing (and even if it wouldn't, it wouldn't know what kind of error
to report).  I think after seeing enum {,struct,class} : type not being
followed by { or ;, there is no reason not to report it right away, as it
can't be valid C++, which is what the patch does.  Not sure if we shouldn't
also return error_mark_node instead of NULL_TREE, so that the caller doesn't
try to parse it as elaborated type specifier (the patch doesn't do that
right now).

Furthermore, while reading the code, I've noticed that
parser->colon_corrects_to_scope_p is saved and set to false at the start
of the function, but not restored back in some cases.  Don't have a testcase
where this would be a problem, but it just seems wrong.  Either we can in
the two spots replace return NULL_TREE; with { type = NULL_TREE; goto out; }
or we could perhaps abuse warning_sentinel or create a special class with
dtor to clean the flag up.

And lastly, I've fixed some formatting issues in the function while reading
it.

2020-03-17  Jakub Jelinek  <jakub@redhat.com>

PR c++/90995
* parser.c (cp_parser_enum_specifier): Use temp_override for
parser->colon_corrects_to_scope_p, replace goto out with return.
If scoped enum or enum with underlying type is not followed by
{ or ;, call cp_parser_commit_to_tentative_parse before calling
cp_parser_error and make sure to return error_mark_node instead of
NULL_TREE.  Formatting fixes.

* g++.dg/cpp0x/enum40.C: New test.

5 years ago[AArch64] PR target/94518: Fix memmodel index in aarch64_store_exclusive_pair
Kyrylo Tkachov [Tue, 7 Apr 2020 17:10:02 +0000 (18:10 +0100)] 
[AArch64] PR target/94518: Fix memmodel index in aarch64_store_exclusive_pair

2020-04-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

        PR target/94518
        2019-09-23  Richard Sandiford  <richard.sandiford@arm.com>

        * config/aarch64/atomics.md (aarch64_store_exclusive_pair): Fix
        memmodel index.

5 years agod: Fix ICE in add_symbol_to_partition_1, at lto/lto-partition.c:215
Iain Buclaw [Tue, 7 Apr 2020 16:02:47 +0000 (18:02 +0200)] 
d: Fix ICE in add_symbol_to_partition_1, at lto/lto-partition.c:215

This patch addresses two problems with TypeInfo initializer generation.

1. D array fields pointing to compiler generated data are referencing
public symbols with no unique prefix, which can lead to duplicate
definition errors in some hard to reduce cases.  To avoid name clashes,
all symbols that are generated for TypeInfo initializers now use the
assembler name of the TypeInfo decl as a prefix.

2. An ICE would occur during LTO pass because these same decls are
considered to be part of the same comdat group as the TypeInfo decl that
it's referred by, despite itself being neither marked public nor comdat.
This resulted in decls being added to the LTRANS partition out of order,
triggering an assert when add_symbol_to_partition_1 attempted to add
them again.  To remedy, TREE_PUBLIC and DECL_COMDAT are now set on all
generated symbols.

gcc/d/ChangeLog:

PR d/94240
* typeinfo.cc (class TypeInfoVisitor): Replace type_ field with decl_.
(TypeInfoVisitor::TypeInfoVisitor): Set decl_.
(TypeInfoVisitor::result): Update.
(TypeInfoVisitor::internal_reference): New function.
(TypeInfoVisitor::layout_string): Use internal_reference.
(TypeInfoVisitor::visit (TypeInfoTupleDeclaration *)): Likewise.
(layout_typeinfo): Construct TypeInfoVisitor with typeinfo decl.
(layout_classinfo): Likewise.

5 years agoi386: Fix emit_reduc_half on V{64Q,32H}Imode [PR94500]
Jakub Jelinek [Tue, 7 Apr 2020 06:27:49 +0000 (08:27 +0200)] 
i386: Fix emit_reduc_half on V{64Q,32H}Imode [PR94500]

The following testcase is miscompiled in 8.x, because emit_reduc_half is
prepared to handle for 512-bit modes only i equal to 512, 256, 128 and 64.
V32HImode also needs i equal to 32 and V64QImode i equal to 32 and 16,
but emit_reduc_half in that case performs a redundant permutation exactly
like i == 32.  In 9+ the testcase works because Richard in r9-3393
changed the reduc_* expanders so that they actually don't call
ix86_expand_reduc on 512-bit modes, but only 128-bit ones.

The patch fixes emit_reduc_half to handle also i of 32 and 16 similarly to
how V32QImode/V16HImode are handled for AVX2.  I think it shouldn't hurt
to fix the function even on the trunk and 9 branch even when nothing uses
it ATM.

2020-04-07  Jakub Jelinek  <jakub@redhat.com>

PR target/94500
* config/i386/i386.c (emit_reduc_half): For V{64QI,32HI}mode
handle i < 64 using avx512bw_lshrv4ti3.  Formatting fixes.

* gcc.target/i386/avx512bw-pr94500.c: New test.

5 years agoDaily bump.
GCC Administrator [Tue, 7 Apr 2020 00:17:30 +0000 (00:17 +0000)] 
Daily bump.

5 years agoFix fortran/93686 -- ICE matching data statements with derived-type pointers.
Fritz Reese [Mon, 6 Apr 2020 20:14:29 +0000 (16:14 -0400)] 
Fix fortran/93686 -- ICE matching data statements with derived-type pointers.

gcc/fortran/ChangeLog:

2020-04-06  Fritz Reese  <foreese@gcc.gnu.org>

Backport from master
Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/93686
* decl.c (gfc_match_data): Handle data matching for derived type
pointers.

gcc/testsuite/ChangeLog:

2020-04-06  Fritz Reese  <foreese@gcc.gnu.org>

Backport from master.
Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/93686
* gfortran.dg/pr93686_1.f90: New test.
* gfortran.dg/pr93686_2.f90: Likewise.
* gfortran.dg/pr93686_3.f90: Likewise.
* gfortran.dg/pr93686_4.f90: Likewise.

5 years agoc++: Fix ICE with lambda in operator function [PR93597]
Marek Polacek [Mon, 6 Apr 2020 00:31:56 +0000 (20:31 -0400)] 
c++: Fix ICE with lambda in operator function [PR93597]

If we are going to use get_first_fn let's make sure we operate on
is_overloaded_fn, as the rest of the codebase does, and if lookup finds
any class-scope declaration, return early too.

PR c++/93597 - ICE with lambda in operator function.
* name-lookup.c (maybe_save_operator_binding): Check is_overloaded_fn.

* g++.dg/cpp0x/lambda/lambda-93597.C: New test.

5 years agoDaily bump.
GCC Administrator [Mon, 6 Apr 2020 00:17:27 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sun, 5 Apr 2020 00:17:25 +0000 (00:17 +0000)] 
Daily bump.

5 years agoc++: Mangling of dependent conversions [PR91377]
Jason Merrill [Sat, 4 Apr 2020 15:45:41 +0000 (11:45 -0400)] 
c++: Mangling of dependent conversions [PR91377]

We skip over other conversion codes when mangling expressions, we should do
the same with IMPLICIT_CONV_EXPR.

gcc/cp/ChangeLog
2020-04-04  Jason Merrill  <jason@redhat.com>

PR c++/91377
* mangle.c (write_expression): Skip IMPLICIT_CONV_EXPR.

5 years agoc++: Fix reuse of class constants [PR94453]
Jason Merrill [Sat, 4 Apr 2020 15:04:55 +0000 (11:04 -0400)] 
c++: Fix reuse of class constants [PR94453]

The testcase hit an ICE trying to expand a TARGET_EXPR temporary cached from
the other lambda-expression.  This patch fixes this in two ways:

1) Avoid reusing a TARGET_EXPR from another function.
2) Avoid ending up with a TARGET_EXPR at all; the use of 'p' had become
<TARGET_EXPR<NON_LVALUE_EXPR<TARGET_EXPR ...>>>, which doesn't make any
sense.

gcc/cp/ChangeLog
2020-04-04  Jason Merrill  <jason@redhat.com>

PR c++/94453
* constexpr.c (maybe_constant_value): Use break_out_target_exprs.
* expr.c (mark_use) [VIEW_CONVERT_EXPR]: Don't wrap a TARGET_EXPR in
NON_LVALUE_EXPR.

5 years agoDaily bump.
GCC Administrator [Sat, 4 Apr 2020 00:17:26 +0000 (00:17 +0000)] 
Daily bump.

5 years agoc++: alias template and parameter packs (PR91966).
Jason Merrill [Fri, 3 Apr 2020 03:40:46 +0000 (23:40 -0400)] 
c++: alias template and parameter packs (PR91966).

In this testcase, when we do a pack expansion of count_better_mins<nums>,
nums appears both in the definition of count_better_mins and as its template
argument.  The intent is that we get a expansion over pairs of elements of
the pack, i.e. less<2,2>, less<2,7>, less<7,2>, ....  But if we substitute
into the definition of count_better_mins when parsing the template, we end
up with sum<less<nums,nums>...>, which never gives us less<2,7>.  We could
deal with this by somehow marking up the use of 'nums' as an argument for
'num', but it's simpler to mark the alias as complex, so we need to
instantiate it later with all its arguments rather than replace it early
with its expansion.

gcc/cp/ChangeLog
2020-04-03  Jason Merrill  <jason@redhat.com>

PR c++/91966
* pt.c (complex_pack_expansion_r): New.
(complex_alias_template_p): Use it.

5 years agogcc-9 sra: Cap number of sub-access propagations with a param (PR 93435)
Martin Jambor [Fri, 3 Apr 2020 18:32:44 +0000 (20:32 +0200)] 
gcc-9 sra: Cap number of sub-access propagations with a param (PR 93435)

This is non-trivial but rather straightforward backport of
29f23ed79b60949fc60f6fdbbd931bd58090b241 from master.  See
https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542390.html for
more information.

2020-04-02  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/93435
* params.def (PARAM_SRA_MAX_PROPAGATIONS): New parameter.
* tree-sra.c (propagation_budget): New variable.
(budget_for_propagation_access): New function.
(propagate_subaccesses_across_link): Use it.
(propagate_all_subaccesses): Set up and destroy propagation_budget.
* doc/invoke.texi (sra-max-propagations): New.

testsuite/
* gcc.dg/tree-ssa/pr93435.c: New test.

5 years agolibstdc++: Fix std::to_address for debug iterators (PR 93960)
Jonathan Wakely [Fri, 3 Apr 2020 11:00:07 +0000 (12:00 +0100)] 
libstdc++: Fix std::to_address for debug iterators (PR 93960)

It should be valid to use std::to_address on a past-the-end iterator,
but the debug mode iterators do a check for dereferenceable in their
operator->(). That check is generally useful, so rather than remove it
this changes std::__to_address to identify a debug mode iterator and
use base().operator->() to skip the check.

Backport from mainline
2020-04-03  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/93960
* include/bits/ptr_traits.h (__to_address): Add special case for debug
iterators, to avoid dereferenceable check.
* testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
* testsuite/20_util/to_address/debug.cc: New test.

5 years agoBackport 55a7380213a5c16120d5c674fb42b38a3d796b57
Martin Liska [Fri, 3 Apr 2020 10:33:41 +0000 (12:33 +0200)] 
Backport 55a7380213a5c16120d5c674fb42b38a3d796b57

Backport from mainline
2020-04-03  Martin Liska  <mliska@suse.cz>

PR ipa/94445
* ipa-icf-gimple.c (func_checker::compare_gimple_call):
  Compare type attributes for gimple_call_fntypes.

5 years agoDaily bump.
GCC Administrator [Fri, 3 Apr 2020 00:17:27 +0000 (00:17 +0000)] 
Daily bump.

5 years agoFix fortran/85982 ICE in resolve_component.
Fritz Reese [Thu, 2 Apr 2020 17:50:11 +0000 (13:50 -0400)] 
Fix fortran/85982 ICE in resolve_component.

2020-04-02  Fritz Reese  <foreese@gcc.gnu.org>

Backport from master.
2020-04-02  Fritz Reese  <foreese@gcc.gnu.org>

PR fortran/85982
* fortran/decl.c (match_attr_spec): Lump COMP_STRUCTURE/COMP_MAP into
attribute checking used by TYPE.

2020-04-02  Fritz Reese  <foreese@gcc.gnu.org>

Backport from master.
2020-04-02  Fritz Reese  <foreese@gcc.gnu.org>

PR fortran/85982
* gfortran.dg/dec_structure_28.f90: New test.

5 years agotree-optimization/94103 avoid CSE of loads with padding
Richard Biener [Thu, 12 Mar 2020 13:18:35 +0000 (14:18 +0100)] 
tree-optimization/94103 avoid CSE of loads with padding

VN currently replaces a load of a 16 byte entity 128 bits of precision
(TImode) with the result of a load of a 16 byte entity with 80 bits of
mode precision (XFmode).  That will go downhill since if the padding
bits are not actually filled with memory contents those bits are
missing.

2020-03-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/94103
* tree-ssa-sccvn.c (visit_reference_op_load): Avoid type
punning when the mode precision is not sufficient.

* gcc.target/i386/pr94103.c: New testcase.

5 years agomiddle-end/94206 fix memset folding to avoid types with padding
Richard Biener [Wed, 18 Mar 2020 12:11:30 +0000 (13:11 +0100)] 
middle-end/94206 fix memset folding to avoid types with padding

This makes sure that the store a memset is folded to uses a type
covering all bits.

2020-03-18   Richard Biener  <rguenther@suse.de>

PR middle-end/94206
* gimple-fold.c (gimple_fold_builtin_memset): Avoid using
partial int modes or not mode-precision integer types for
the store.

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

5 years agoaarch64: Fix ICE due to aarch64_gen_compare_reg_maybe_ze [PR94435]
Jakub Jelinek [Thu, 2 Apr 2020 10:54:47 +0000 (12:54 +0200)] 
aarch64: Fix ICE due to aarch64_gen_compare_reg_maybe_ze [PR94435]

The following testcase ICEs, because aarch64_gen_compare_reg_maybe_ze emits
invalid RTL.
For y_mode [QH]Imode it expects y to be of that mode (or CONST_INT that fits
into that mode) and x being SImode; for non-CONST_INT y it zero extends y
into SImode and compares that against x, for CONST_INT y it zero extends y
into SImode.  The problem is that when the zero extended constant isn't
usable directly, it forces it into a REG, but with y_mode mode, and then
compares against y.  That is wrong, because it should force it into a SImode
REG and compare that way.

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

PR target/94435
* config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): For
y_mode E_[QH]Imode and y being a CONST_INT, change y_mode to SImode.

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

5 years agofortran : ICE in gfc_resolve_findloc PR93498
Mark Eggleston [Thu, 2 Apr 2020 07:42:41 +0000 (08:42 +0100)] 
fortran : ICE in gfc_resolve_findloc PR93498

ICE occurs when findloc is used with character arguments of different
kinds.  If the character kinds are different reject the code.

Original patch provided by Steven G. Kargl  <kargl@gcc.gnu.org>.

gcc/fortran/ChangeLog:

Backport from master
Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/93498
* check.c (gfc_check_findloc):  If the kinds of the arguments
differ goto label "incompat".

gcc/testsuite/ChangeLog:

Backport from master
2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>

PR fortran/93498
* gfortran.dg/pr93498_1.f90:  New test.
* gfortran.dg/pr93498_2.f90:  New test.

5 years agofortran: ICE equivalence with an element of an array PR94030
Mark Eggleston [Thu, 2 Apr 2020 07:26:34 +0000 (08:26 +0100)] 
fortran: ICE equivalence with an element of an array PR94030

Deferred size arrays can not be used in equivalance statements.

gcc/fortran/ChangeLog:

Backport from master
2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>

PR fortran/94030
* resolve.c (resolve_equivalence): Correct formatting
around the label "identical_types".  Instead of using
gfc_resolve_array_spec use is_non_constants_shape_array
to determine whether the array can be used in a in an
equivalence statement.

gcc/testsuite/ChangeLog:

Backport from master
2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>

PR fortran/94030
* gfortran.dg/pr94030_1.f90
* gfortran.dg/pr94030_2.f90

5 years agoDaily bump.
GCC Administrator [Thu, 2 Apr 2020 00:17:24 +0000 (00:17 +0000)] 
Daily bump.

5 years agodoc: Fix a typo in the documentation of the copy attribute
Zackery Spytz [Wed, 1 Apr 2020 17:06:16 +0000 (18:06 +0100)] 
doc: Fix a typo in the documentation of the copy attribute

2020-04-01  Zackery Spytz  <zspytz@gmail.com>

gcc/
* doc/extend.texi: Fix a typo in the documentation of the
copy function attribute.

5 years agoaarch64: Fix up aarch64_compare_and_swaphi pattern [PR94368]
Kyrylo Tkachov [Wed, 1 Apr 2020 12:53:05 +0000 (13:53 +0100)] 
aarch64: Fix up aarch64_compare_and_swaphi pattern [PR94368]

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2020-03-31  Jakub Jelinek  <jakub@redhat.com>

PR target/94368
* config/aarch64/constraints.md (Uph): New constraint.
* config/aarch64/atomics.md (cas_short_expected_imm): New mode attr.
(@aarch64_compare_and_swap<mode>): Use it instead of n in operand 2's
constraint.

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

5 years agoaarch64: Configure for sys/auxv.h in libgcc for lse-init.c
Kyrylo Tkachov [Wed, 1 Apr 2020 11:13:39 +0000 (12:13 +0100)] 
aarch64: Configure for sys/auxv.h in libgcc for lse-init.c

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2019-09-25  Richard Henderson  <richard.henderson@linaro.org>

PR target/91833
* config/aarch64/lse-init.c: Include auto-target.h.  Disable
initialization if !HAVE_SYS_AUXV_H.
* configure.ac (AC_CHECK_HEADERS): Add sys/auxv.h.
* config.in, configure: Rebuild.

5 years agoaarch64: Fix store-exclusive in load-operate LSE helpers
Kyrylo Tkachov [Wed, 1 Apr 2020 11:11:58 +0000 (12:11 +0100)] 
aarch64: Fix store-exclusive in load-operate LSE helpers

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2019-09-25  Richard Henderson  <richard.henderson@linaro.org>

PR target/91834
* config/aarch64/lse.S (LDNM): Ensure STXR output does not
overlap the inputs.

5 years ago[AArch64] Fix shrinkwrapping interactions with atomics (PR92692)
Kyrylo Tkachov [Wed, 1 Apr 2020 11:09:09 +0000 (12:09 +0100)] 
[AArch64] Fix shrinkwrapping interactions with atomics (PR92692)

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2020-01-17  Wilco Dijkstra  <wdijkstr@arm.com>

PR target/92692
* config/aarch64/atomics.md (aarch64_compare_and_swap<mode>)
Use epilogue_completed rather than reload_completed.

5 years agoaarch64: Implement -moutline-atomics
Kyrylo Tkachov [Wed, 1 Apr 2020 11:00:14 +0000 (12:00 +0100)] 
aarch64: Implement -moutline-atomics

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2019-09-19  Richard Henderson  <richard.henderson@linaro.org>

* config/aarch64/aarch64.opt (-moutline-atomics): New.
* config/aarch64/aarch64.c (aarch64_atomic_ool_func): New.
(aarch64_ool_cas_names, aarch64_ool_swp_names): New.
(aarch64_ool_ldadd_names, aarch64_ool_ldset_names): New.
(aarch64_ool_ldclr_names, aarch64_ool_ldeor_names): New.
(aarch64_expand_compare_and_swap): Honor TARGET_OUTLINE_ATOMICS.
* config/aarch64/atomics.md (atomic_exchange<ALLI>): Likewise.
(atomic_<atomic_op><ALLI>): Likewise.
(atomic_fetch_<atomic_op><ALLI>): Likewise.
(atomic_<atomic_op>_fetch<ALLI>): Likewise.
* doc/invoke.texi: Document -moutline-atomics.

* gcc.target/aarch64/atomic-op-acq_rel.c: Use -mno-outline-atomics.
* gcc.target/aarch64/atomic-comp-swap-release-acquire.c: Likewise.
* gcc.target/aarch64/atomic-op-acquire.c: Likewise.
* gcc.target/aarch64/atomic-op-char.c: Likewise.
* gcc.target/aarch64/atomic-op-consume.c: Likewise.
* gcc.target/aarch64/atomic-op-imm.c: Likewise.
* gcc.target/aarch64/atomic-op-int.c: Likewise.
* gcc.target/aarch64/atomic-op-long.c: Likewise.
* gcc.target/aarch64/atomic-op-relaxed.c: Likewise.
* gcc.target/aarch64/atomic-op-release.c: Likewise.
* gcc.target/aarch64/atomic-op-seq_cst.c: Likewise.
* gcc.target/aarch64/atomic-op-short.c: Likewise.
* gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c: Likewise.
* gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c: Likewise.
* gcc.target/aarch64/sync-comp-swap.c: Likewise.
* gcc.target/aarch64/sync-op-acquire.c: Likewise.
* gcc.target/aarch64/sync-op-full.c: Likewise.

5 years agoaarch64: Add out-of-line functions for LSE atomics
Kyrylo Tkachov [Wed, 1 Apr 2020 10:56:24 +0000 (11:56 +0100)] 
aarch64: Add out-of-line functions for LSE atomics

This is the libgcc part of the interface -- providing the functions.
Rationale is provided at the top of libgcc/config/aarch64/lse.S.

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2019-09-19  Richard Henderson  <richard.henderson@linaro.org>

* config/aarch64/lse-init.c: New file.
* config/aarch64/lse.S: New file.
* config/aarch64/t-lse: New file.
* config.host: Add t-lse to all aarch64 tuples.

5 years agoaarch64: Tidy aarch64_split_compare_and_swap
Kyrylo Tkachov [Wed, 1 Apr 2020 10:54:14 +0000 (11:54 +0100)] 
aarch64: Tidy aarch64_split_compare_and_swap

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2019-09-19  Richard Henderson  <richard.henderson@linaro.org>

* config/aarch64/aarch64 (aarch64_split_compare_and_swap): Disable
strong_zero_p for aarch64_track_speculation; unify some code paths;
use aarch64_gen_compare_reg instead of open-coding.

5 years agoaarch64: Implement TImode compare-and-swap
Kyrylo Tkachov [Wed, 1 Apr 2020 10:48:52 +0000 (11:48 +0100)] 
aarch64: Implement TImode compare-and-swap

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2019-09-19  Richard Henderson  <richard.henderson@linaro.org>

* config/aarch64/aarch64.c (aarch64_gen_compare_reg): Add support
for NE comparison of TImode values.
(aarch64_emit_load_exclusive): Add support for TImode.
(aarch64_emit_store_exclusive): Likewise.
(aarch64_split_compare_and_swap): Disable strong_zero_p for TImode.
* config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI_TI>):
Change iterator from ALLI to ALLI_TI.
(@atomic_compare_and_swap<JUST_TI>): New.
(@atomic_compare_and_swap<JUST_TI>_lse): New.
(aarch64_load_exclusive_pair): New.
(aarch64_store_exclusive_pair): New.
* config/aarch64/iterators.md (JUST_TI): New.

5 years agoaarch64: Extend %R for integer registers
Kyrylo Tkachov [Wed, 1 Apr 2020 10:43:00 +0000 (11:43 +0100)] 
aarch64: Extend %R for integer registers

2020-04-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

        Backport from mainline
        2019-09-19  Richard Henderson  <richard.henderson@linaro.org>

        * config/aarch64/aarch64.c (aarch64_print_operand): Allow integer
        registers with %R.

5 years agoDaily bump.
GCC Administrator [Wed, 1 Apr 2020 00:17:49 +0000 (00:17 +0000)] 
Daily bump.

5 years agoc++: Fix comparison of fn() and ns::fn() [PR90711]
Jason Merrill [Mon, 30 Mar 2020 20:09:43 +0000 (16:09 -0400)] 
c++: Fix comparison of fn() and ns::fn() [PR90711]

The resolution of CWG issue 1321 clarified that when deciding whether two
expressions involving template parameters are equivalent, two dependent
function calls where the function is named with an unqualified-id are
considered to be equivalent if the name is the same, even if unqualified
lookup finds different sets of functions.  We were wrongly treating
qualified-ids the same way, so that EXISTS and test::EXISTS were considered
to be equivalent even though they are looking up the name in different
scopes.  This also causes a mangling bug, but I don't think it's safe to fix
that for GCC 10; this patch just fixes the comparison.

gcc/cp/ChangeLog
2020-03-30  Jason Merrill  <jason@redhat.com>

PR c++/90711
* tree.c (cp_tree_equal) [CALL_EXPR]: Compare KOENIG_LOOKUP_P.
(called_fns_equal): Check DECL_CONTEXT.

5 years agors6000: vec_rlnm fix to make builtin work according to ABI
Carl Love [Tue, 31 Mar 2020 16:41:26 +0000 (11:41 -0500)] 
rs6000: vec_rlnm fix to make builtin work according to ABI

Backport from mainline:
  commit e97929e20b2f52e6cfc046c1302324d1b24d95e3
  Author: Carl Love <carll@us.ibm.com>
  Date:   Wed Mar 25 18:33:37 2020 -0500

gcc/ChangeLog

PR target/93819
            * gcc/config/rs6000/altivec.h:
            Fixed swapped arguments for vec_rlnm define.

5 years agors6000: Add command line and builtin compatibility check
Carl Love [Tue, 31 Mar 2020 16:30:00 +0000 (11:30 -0500)] 
rs6000: Add command line and builtin compatibility check

2020-03-31  Carl Love  <cel@us.ibm.com>

backport of mainline commit

commit 68dd57808f7c0147acdb5ca72c88ff655afcb0ce
Author: Carl Love <carll@us.ibm.com>
Date:   Fri Mar 20 18:15:05 2020 -0500

whith change log typo fixed.

PR target/87583
* gcc/config/rs6000/rs6000.c (rs6000_option_override_internal):
Add check for TARGET_FPRND for Power 7 or newer.

5 years agoDaily bump.
GCC Administrator [Tue, 31 Mar 2020 00:17:33 +0000 (00:17 +0000)] 
Daily bump.

5 years ago[Fortran] Fix result-variable handling of MODULE PROCEDURE (PR94348)
Tobias Burnus [Mon, 30 Mar 2020 07:23:12 +0000 (09:23 +0200)] 
[Fortran] Fix result-variable handling of MODULE PROCEDURE (PR94348)

Backport from mainline
2020-03-28  Tobias Burnus  <tobias@codesourcery.com>

PR fortran/94348
* decl.c (gfc_match_submod_proc): Add result var to the
proc's namespace.

PR fortran/94348
* gfortran.dg/module_procedure_3.f90: New.

5 years agoDaily bump.
GCC Administrator [Mon, 30 Mar 2020 00:17:31 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sun, 29 Mar 2020 00:17:27 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sat, 28 Mar 2020 00:17:31 +0000 (00:17 +0000)] 
Daily bump.

5 years agoc++: Fix ICE popping local scope [pr84733]
Nathan Sidwell [Fri, 27 Mar 2020 20:13:39 +0000 (13:13 -0700)] 
c++: Fix ICE popping local scope [pr84733]

PR c++/84733
* name-lookup.c (do_pushdecl): Look through cleanp levels.

5 years agoDaily bump.
GCC Administrator [Fri, 27 Mar 2020 00:17:36 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Thu, 26 Mar 2020 00:17:37 +0000 (00:17 +0000)] 
Daily bump.

5 years agofortran: ICE using undeclared symbol in array constructor PR93484
Mark Eggleston [Wed, 25 Mar 2020 13:43:23 +0000 (13:43 +0000)] 
fortran: ICE using undeclared symbol in array constructor PR93484

Using undeclared symbol k in an expression in the following
array constructor results in an ICE:

    print *, [real(x(k))]

If the call to the intrinsic is not in a constructor a no IMPLICIT
type error is reported and the ICE does not occur.

Matching on an expression instead of an initialisation express an
and not converting a MATCH_ERROR return value into MATCH_NO results
in the no IMPLICIT error and no ICE.

Note: Steven G. Kargl  <kargl@gcc.gnu.org> is the author of the
changes except for the test cases.

gcc/fortran/ChangeLog:

Backport from master
2020-03-25  Mark Eggleston <markeggleston@gcc.gnu.org>

PR fortran/93484
* match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.

gcc/testsuite

Backport from master
2020-03-25  Mark Eggleston <markeggleston@gcc.gnu.org>

PR fortran/93484
* gfortran.dg/pr93484_1.f90: New test.
* gfortran.dg/pr93484_2.f90: New test.

5 years ago[testsuite] Fix PR93935 to guard case under vect_hw_misalign
Kewen Lin [Fri, 13 Mar 2020 10:51:21 +0000 (05:51 -0500)] 
[testsuite] Fix PR93935 to guard case under vect_hw_misalign

This patch is to apply the same fix as r267528 to another similar case
bb-slp-over-widen-2.c which requires misaligned vector access.

gcc/testsuite/ChangeLog

2020-03-25  Kewen Lin  <linkw@gcc.gnu.org>

    Backport from master
    2020-03-13  Kewen Lin  <linkw@gcc.gnu.org>

    PR testsuite/93935
    * gcc.dg/vect/bb-slp-over-widen-2.c: Expect basic block vectorized
    messages only on vect_hw_misalign targets.

5 years agoDaily bump.
GCC Administrator [Wed, 25 Mar 2020 00:17:25 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDefine __BIG_ENDIAN__
John David Anglin [Tue, 24 Mar 2020 17:07:23 +0000 (17:07 +0000)] 
Define __BIG_ENDIAN__

2020-03-24  John David Anglin  <danglin@gcc.gnu.org>

PR lto/94249
* config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Define __BIG_ENDIAN__.

5 years agoAArch64: Break apart paradoxical subregs for VSTRUCT writes (PR target/94052)
Tamar Christina [Tue, 24 Mar 2020 12:36:19 +0000 (12:36 +0000)] 
AArch64: Break apart paradoxical subregs for VSTRUCT writes (PR target/94052)

This works around an ICE in reload where from expand we get the following RTL
generated for VSTRUCT mode writes:

(insn 446 354 445 2 (set (reg:CI 383)
 (subreg:CI (reg:V4SI 291) 0)) "small.i":146:22 3408 {*aarch64_movci}
 (nil))

This sequence is trying to say two things:

1) liveliness: It's trying to say that eventually the whole CI reg will be
       written to. It does this by generating the paradoxical subreg.
2) write data: It's trying to in the same instruction also write the V4SI mode
       component at offset 0 in the CI reg.

This patch fixes it by in the backend when we see such a paradoxical
construction breaking it apart and issuing a clobber to correct the liveliness
information and then emitting a normal subreg write for the component that the
paradoxical subreg was trying to write to.

Concretely we generate this:

(insn 42 41 43 (clobber (reg/v:CI 122 [ diD.5226 ])) "small.i":121:23 -1
     (nil))

(insn 43 42 44 (set (subreg:V4SI (reg/v:CI 122 [ diD.5226 ]) 0)
        (reg:V4SI 136)) "small.i":121:23 -1
     (nil))

gcc/ChangeLog:

PR target/94052
* config/aarch64/aarch64-simd.md (mov<mode>): Remove paradoxical
subregs of VSTRUCT modes.

gcc/testsuite/ChangeLog:

PR target/94052
        * g++.target/aarch64/pr94052.C: New test.

5 years agobackport PR94125: Update post order number for merged SCC.
Bin Cheng [Tue, 24 Mar 2020 09:40:21 +0000 (17:40 +0800)] 
backport PR94125: Update post order number for merged SCC.

Function loop_distribution::break_alias_scc_partitions needs to compute
SCC with runtime alias edges skipped.  As a result, partitions could be
re-assigned larger post order number than SCC's precedent partition and
distributed before the precedent one.  This fixes the issue by updating
the merged partition to the minimal post order in SCC.

Backport from mainline.
    PR tree-optimization/94125
    * tree-loop-distribution.c
    (loop_distribution::break_alias_scc_partitions): Update post order
    number for merged scc.

    * gcc.dg/tree-ssa/pr94125.c: New test.

5 years agoDaily bump.
GCC Administrator [Tue, 24 Mar 2020 00:17:39 +0000 (00:17 +0000)] 
Daily bump.

5 years agoRemove wrongly committed file.
Joseph Myers [Mon, 23 Mar 2020 19:07:40 +0000 (19:07 +0000)] 
Remove wrongly committed file.

5 years agobackport PR90763: PowerPC vec_xl_len should take const argument.
Will Schmidt [Mon, 23 Mar 2020 19:04:20 +0000 (14:04 -0500)] 
backport PR90763: PowerPC vec_xl_len should take const argument.

    2020-03-23  Will Schmidt  <will_schmidt@vnet.ibm.com>

    Backport from mainline.
    2020-03-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

    PR target/90763
    * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
    add clause to handle P9V_BUILTIN_VEC_LXVL with const arguments.

    * gcc.target/powerpc/pr90763.c: New.

5 years agoDarwin: Fix i686 bootstrap when the assembler supports GOTOFF in data.
Iain Sandoe [Mon, 23 Mar 2020 17:10:05 +0000 (17:10 +0000)] 
Darwin: Fix i686 bootstrap when the assembler supports GOTOFF in data.

When we use an assembler that supports " .long XX@GOTOFF", the current
combination of configuration parameters and conditional compilation
(when building an i686-darwin compiler with mdynamic-no-pic) assume that
it's OK to put jump tables in the .const section.

However, when we encounter a weak function with a jump table, this
produces relocations that directly access the weak symbol section from
the .const section - which is deemed illegal by the linker (since that
would mean that the weak symbol could not be replaced).

Arguably, this is a limitation (maybe even a bug) in the linker - but
it seems that we'd have to change the ABI to fix it - since it would
require some annotation (maybe just using a special section for the
jump tables) to tell the linker that this specific circumstance is OK
because the direct access to the weak symbol can only occur from that
symbol itself.

The fix is to force jump tables into the text section for all X86 Darwin
versions (PIC code already had this change).

gcc/ChangeLog:

2020-03-23  Iain Sandoe  <iain@sandoe.co.uk>

Backport from master.
2020-03-22  Iain Sandoe  <iain@sandoe.co.uk>

* config/i386/darwin.h (JUMP_TABLES_IN_TEXT_SECTION): Remove
references to Darwin.
* config/i386/i386.h (JUMP_TABLES_IN_TEXT_SECTION): Define this
unconditionally and comment on why.

5 years agoDaily bump.
GCC Administrator [Mon, 23 Mar 2020 00:17:27 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sun, 22 Mar 2020 12:52:15 +0000 (12:52 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sat, 21 Mar 2020 00:17:31 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Fri, 20 Mar 2020 00:17:30 +0000 (00:17 +0000)] 
Daily bump.

5 years agodoc: Note that some warnings depend on optimizations (PR 92757)
Jonathan Wakely [Thu, 19 Mar 2020 15:33:02 +0000 (15:33 +0000)] 
doc: Note that some warnings depend on optimizations (PR 92757)

Backport from mainline
2020-01-13  Jonathan Wakely  <jwakely@redhat.com>

PR driver/92757
* doc/invoke.texi (Warning Options): Add caveat about some warnings
depending on optimization settings.

5 years agors6000: Check -+0 and NaN for smax/smin generation
Jiufu Guo [Tue, 10 Mar 2020 05:51:57 +0000 (13:51 +0800)] 
rs6000: Check -+0 and NaN for smax/smin generation

PR93709 mentioned regressions on maxlocval_4.f90 and minlocval_f.f90 which
relates to max of '-inf' and 'nan'. This regression occur on P9 because
P9 new instruction 'xsmaxcdp' is generated.
And for C code `a < b ? b : a` is also generated as `xsmaxcdp` under -O2
for P9. While this instruction behavior more like C/C++ semantic (a>b?a:b).
In GCC9, the issue also occur as the new test case shows.

This generates prevents 'xsmaxcdp' to be generated for those cases.
'xsmincdp' also is handled in patch.

gcc/
2020-03-19  Jiufu Guo  <guojiufu@linux.ibm.com>

PR target/93709
* gcc/config/rs6000/rs6000.c (rs6000_emit_p9_fp_minmax): Check
NAN and SIGNED_ZEROR for smax/smin.

gcc/testsuite
2020-03-19  Jiufu Guo  <guojiufu@linux.ibm.com>

PR target/93709
* gcc.target/powerpc/p9-minmax-3.c: New test.

5 years agoDaily bump.
GCC Administrator [Thu, 19 Mar 2020 00:17:31 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Wed, 18 Mar 2020 00:17:30 +0000 (00:17 +0000)] 
Daily bump.

5 years agoexpand: Don't depend on warning flags in code generation of strnlen [PR94189]
Jakub Jelinek [Tue, 17 Mar 2020 09:42:35 +0000 (10:42 +0100)] 
expand: Don't depend on warning flags in code generation of strnlen [PR94189]

The following testcase FAILs with -O2 -fcompare-debug, but the reason isn't
that we'd emit different code based on -g or non-debug, but rather that
we emit different code depending on whether -w is used or not (or e.g.
-Wno-stringop-overflow or whether some other pass emitted some other warning
already on the call).

Code generation shouldn't depend on whether we emit a warning or not if at
all possible.

The following patch punts (i.e. doesn't optimize the strnlen call to a
constant value) if we would emit the warning if it was enabled.
In the PR there is an alternate patch which does optimize the strnlen call
no matter if we emit the warning or not, though I think I prefer the version
below, e.g. the strnlen call might be crossing field boundaries, which is in
strict reading undefined, but I'd be afraid people do that in the real
world programs.

2020-03-17  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/94189
* builtins.c (expand_builtin_strnlen): Do return NULL_RTX if we would
emit a warning if it was enabled and don't depend on TREE_NO_WARNING
for code-generation.

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

5 years agotree-inline: Fix a -fcompare-debug issue in the inliner [PR94167]
Jakub Jelinek [Mon, 16 Mar 2020 08:03:59 +0000 (09:03 +0100)] 
tree-inline: Fix a -fcompare-debug issue in the inliner [PR94167]

The following testcase fails with -fcompare-debug.  The problem is that
bar is marked as address_taken only with -g and not without.
I've tracked it down to insert_init_stmt calling gimple_regimplify_operands
even on DEBUG_STMTs.  That function will just insert normal stmts before
the DEBUG_STMT if the DEBUG_STMT operand isn't gimple val or invariant.
While DCE will turn those statements into debug temporaries, it can cause
differences in SSA_NAMEs and more importantly, the ipa references are
generated from those before the DCE happens.
On the testcase, the DEBUG_STMT value is (int)bar.

We could generate DEBUG_STMTs with debug temporaries instead, but I fail to
see the reason to do that, DEBUG_STMTs allow other expressions and all we
want to ensure is that the expressions aren't too large (arbitrarily
complex), but during inlining/function versioning I don't see why something
would queue a DEBUG_STMT with arbitrarily complex expressions in there.

2020-03-16  Jakub Jelinek  <jakub@redhat.com>

PR debug/94167
* tree-inline.c (insert_init_stmt): Don't gimple_regimplify_operands
DEBUG_STMTs.

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

5 years agotree-nested: Fix handling of *reduction clauses with C array sections [PR93566]
Jakub Jelinek [Sun, 15 Mar 2020 00:27:40 +0000 (01:27 +0100)] 
tree-nested: Fix handling of *reduction clauses with C array sections [PR93566]

tree-nested.c didn't handle C array sections in {,task_,in_}reduction clauses.

2020-03-14  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/93566
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Handle {,in_,task_}reduction clauses
with C/C++ array sections.

* testsuite/libgomp.c/pr93566.c: New test.

5 years agoaarch64: Fix another bug in aarch64_add_offset_1 [PR94121]
Jakub Jelinek [Fri, 13 Mar 2020 10:33:16 +0000 (11:33 +0100)] 
aarch64: Fix another bug in aarch64_add_offset_1 [PR94121]

> I'm getting this ICE with -mabi=ilp32:
>
> during RTL pass: fwprop1
> /opt/gcc/gcc-20200312/gcc/testsuite/gcc.dg/pr94121.c: In function 'bar':
> /opt/gcc/gcc-20200312/gcc/testsuite/gcc.dg/pr94121.c:16:1: internal compiler error: in decompose, at rtl.h:2279

That is a preexisting issue, caused by another bug in the same function.
When mode is SImode and moffset is 0x80000000 (or anything else with the
bit 31 set), we need to sign-extend it.

2020-03-13  Jakub Jelinek  <jakub@redhat.com>

PR target/94121
* config/aarch64/aarch64.c (aarch64_add_offset_1): Use gen_int_mode
instead of GEN_INT.

5 years agomaintainer-scripts: Fix up gcc_release without -l, where mkdir was using umask 077...
Jakub Jelinek [Thu, 12 Mar 2020 17:30:16 +0000 (18:30 +0100)] 
maintainer-scripts: Fix up gcc_release without -l, where mkdir was using umask 077 after migration

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

* gcc_release (upload_files): Without -l, pass -m 755 to the mkdir
command invoked through ssh.

5 years agodoc: Fix up ASM_OUTPUT_ALIGNED_DECL_LOCAL description
Jakub Jelinek [Thu, 12 Mar 2020 08:35:30 +0000 (09:35 +0100)] 
doc: Fix up ASM_OUTPUT_ALIGNED_DECL_LOCAL description

When looking into PR94134, I've noticed bugs in the
ASM_OUTPUT_ALIGNED_DECL_LOCAL documentation.  varasm.c has:
  #if defined ASM_OUTPUT_ALIGNED_DECL_LOCAL
    unsigned int align = symtab_node::get (decl)->definition_alignment ();
    ASM_OUTPUT_ALIGNED_DECL_LOCAL (asm_out_file, decl, name,
                                   size, align);
    return true;
  #elif defined ASM_OUTPUT_ALIGNED_LOCAL
    unsigned int align = symtab_node::get (decl)->definition_alignment ();
    ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size, align);
    return true;
  #else
    ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
    return false;
  #endif
and the ASM_OUTPUT_ALIGNED_LOCAL documentation properly mentions:
Like @code{ASM_OUTPUT_LOCAL} and mentions the same macro in another place.
The ASM_OUTPUT_ALIGNED_DECL_LOCAL description mentions non-existing macros
ASM_OUTPUT_ALIGNED_DECL and ASM_OUTPUT_DECL instead of the right ones
ASM_OUTPUT_ALIGNED_LOCAL and ASM_OUTPUT_LOCAL.

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

* doc/tm.texi.in (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Change
ASM_OUTPUT_ALIGNED_DECL in description to ASM_OUTPUT_ALIGNED_LOCAL
and ASM_OUTPUT_DECL to ASM_OUTPUT_LOCAL.
* doc/tm.texi: Regenerated.

5 years agotree-dse: Fix mem* head trimming if call has lhs [PR94130]
Jakub Jelinek [Thu, 12 Mar 2020 08:34:00 +0000 (09:34 +0100)] 
tree-dse: Fix mem* head trimming if call has lhs [PR94130]

As the testcase shows, if DSE decides to head trim {mem{set,cpy,move},strncpy}
and the call has lhs, it is incorrect to leave the lhs as is, because it
will then point to the adjusted address (base + head_trim) instead of the
original base.
The following patch fixes that by dropping the lhs of the call and assigning
lhs the original base in a following statement.

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

PR tree-optimization/94130
* tree-ssa-dse.c: Include gimplify.h.
(increment_start_addr): If stmt has lhs, drop the lhs from call and
set it after the call to the original value of the first argument.
Formatting fixes.
(decrement_count): Formatting fix.

* gcc.c-torture/execute/pr94130.c: New test.

5 years agopdp11: Fix handling of common (local and global) vars [PR94134]
Jakub Jelinek [Wed, 11 Mar 2020 17:35:13 +0000 (18:35 +0100)] 
pdp11: Fix handling of common (local and global) vars [PR94134]

As mentioned in the PR, the generic code decides to put the a variable into
lcomm_section, which is a NOSWITCH section and thus the generic code doesn't
switch into a particular section before using
ASM_OUTPUT{_ALIGNED{,_DECL}_}_LOCAL, on many targets that results just in
.lcomm (or for non-local .comm) directives which don't need a switch to some
section, other targets put switch_to_section (bss_section) at the start of
that macro.
pdp11 doesn't do that (and doesn't have bss_section), and so emits the
lcomm/comm variables in whatever section is current (it has only .text/.data
and for DEC assembler rodata).

The following patch fixes that by putting it always into data section, and
additionally avoids emitting an empty line in the assembly for the lcomm
vars.

2020-03-11  Jakub Jelinek  <jakub@redhat.com>

PR target/94134
* config/pdp11/pdp11.c (pdp11_asm_output_var): Call switch_to_section
at the start to switch to data section.  Don't print extra newline if
.globl directive has not been emitted.

* gcc.c-torture/execute/pr94134.c: New test.

5 years agoaarch64: Fix ICE in aarch64_add_offset_1 [PR94121]
Jakub Jelinek [Wed, 11 Mar 2020 09:54:22 +0000 (10:54 +0100)] 
aarch64: Fix ICE in aarch64_add_offset_1 [PR94121]

abs_hwi asserts that the argument is not HOST_WIDE_INT_MIN and as the
(invalid) testcase shows, the function can be called with such an offset.
The following patch is IMHO minimal fix, absu_hwi unlike abs_hwi allows even
that value and will return (unsigned HOST_WIDE_INT) HOST_WIDE_INT_MIN
in that case.  The function then uses moffset in two spots which wouldn't
care if the value is (unsigned HOST_WIDE_INT) HOST_WIDE_INT_MIN or
HOST_WIDE_INT_MIN and wouldn't accept it (!moffset and
aarch64_uimm12_shift (moffset)), then in one spot where the signedness of
moffset does matter and using unsigned is the right thing -
moffset < 0x1000000 - and finally has code which will handle even this
value right; the assembler doesn't really care for DImode immediates if
        mov     x1, -9223372036854775808
or
        mov     x1, 9223372036854775808
is used and similarly it doesn't matter if we add or sub it in DImode.

2020-03-11  Jakub Jelinek  <jakub@redhat.com>

PR target/94121
* config/aarch64/aarch64.c (aarch64_add_offset_1): Use absu_hwi
instead of abs_hwi, change moffset type to unsigned HOST_WIDE_INT.

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

5 years agodfp: Fix decimal_to_binary [PR94111]
Jakub Jelinek [Wed, 11 Mar 2020 08:33:52 +0000 (09:33 +0100)] 
dfp: Fix decimal_to_binary [PR94111]

As e.g. decimal_from_decnumber shows, the REAL_VALUE_TYPE representation
contains a decimal128 embedded in ->sig only if it is rvc_normal, for
other kinds like rvc_inf or rvc_nan, ->sig is ignored and everything is
contained in the REAL_VALUE_TYPE flags (cl, sign, signalling and decimal).
decimal_to_binary which is used when folding a decimal{32,64,128} constant
to a binary floating point type ignores this and thus folds infinities and
NaNs into +0.0.
The following patch fixes that by only doing that for rvc_normal.
Similarly to the binary to decimal folding, it goes through a string, in
order to e.g. deal with canonical NaN mantissas, or binary float formats
that don't support infinities and/or NaNs.

2020-03-11  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/94111
* dfp.c (decimal_to_binary): Only use decimal128ToString if from->cl
is rvc_normal, otherwise use real_to_decimal to print the number to
string.

* gcc.dg/dfp/pr94111.c: New test.

5 years agoldist: Further fixes for -ftrapv [PR94114]
Jakub Jelinek [Wed, 11 Mar 2020 08:32:22 +0000 (09:32 +0100)] 
ldist: Further fixes for -ftrapv [PR94114]

As the testcase shows, arithmetics that for -ftrapv would need multiple
basic blocks can show up not just in nb_bytes expressions where we
are calling rewrite_to_non_trapping_overflow for a while already,
but also in the pointer expression to the start of the region.
While the testcase covers just the first hunk and I've failed to create
a testcase for the latter, it is at least in theory possible too, so I've
adjusted that hunk too.

2020-03-11  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/94114
* tree-loop-distribution.c (generate_memset_builtin): Call
rewrite_to_non_trapping_overflow even on mem.
(generate_memcpy_builtin): Call rewrite_to_non_trapping_overflow even
on dest and src.

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

5 years agoprint-rtl: Fix printing of CONST_STRING in DEBUG_INSNs [PR93399]
Jakub Jelinek [Thu, 5 Mar 2020 08:12:44 +0000 (09:12 +0100)] 
print-rtl: Fix printing of CONST_STRING in DEBUG_INSNs [PR93399]

The following testcase fails to assemble, as CONST_STRING in the DEBUG_INSNs
is printed as is, so if it contains \n and/or \r, we are in trouble:
        .loc 1 14 3
        # DEBUG haystack => [si]
        # DEBUG needle => "
"
In the gimple dumps we print those (STRING_CSTs) as
  # DEBUG haystack => D#1
  # DEBUG needle => "\n"
so this patch uses what we use in tree printing for the CONST_STRINGs too.

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

PR middle-end/93399
* tree-pretty-print.h (pretty_print_string): Declare.
* tree-pretty-print.c (pretty_print_string): Remove forward
declaration, no longer static.  Change nbytes parameter type
from unsigned to size_t.
* print-rtl.c (print_value) <case CONST_STRING>: Use
pretty_print_string and for shrink way too long strings.

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

5 years agoinliner: Copy DECL_BY_REFERENCE in copy_decl_to_var [PR93888]
Jakub Jelinek [Wed, 4 Mar 2020 11:59:04 +0000 (12:59 +0100)] 
inliner: Copy DECL_BY_REFERENCE in copy_decl_to_var [PR93888]

In the following testcase we emit wrong debug info for the karg
parameter in the DW_TAG_inlined_subroutine into main.
The problem is that the karg PARM_DECL is DECL_BY_REFERENCE and thus
in the IL has const K & type, but in the source just const K.
When the function is inlined, we create a VAR_DECL for it, but don't
set DECL_BY_REFERENCE, so when emitting DW_AT_location, we treat it like
a const K & typed variable, but it has DW_AT_abstract_origin which has
just the const K type and thus the debugger thinks the variable has
const K type.

Fixed by copying the DECL_BY_REFERENCE flag.  Not doing it in
copy_decl_for_dup_finish, because copy_decl_no_change already copies
that flag through copy_node and in copy_result_decl_to_var it is
undesirable, as we handle DECL_BY_REFERENCE in that case instead
by changing the type.

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

PR debug/93888
* tree-inline.c (copy_decl_to_var): Copy DECL_BY_REFERENCE flag.

* g++.dg/guality/pr93888.C: New test.

5 years agotailcall: Fix up process_assignment [PR94001]
Jakub Jelinek [Wed, 4 Mar 2020 08:01:59 +0000 (09:01 +0100)] 
tailcall: Fix up process_assignment [PR94001]

When a function returns void or the return value is ignored, ass_var
is NULL_TREE.  The tail recursion handling generally assumes DCE has been
performed and so doesn't expect to encounter useless assignments after the
call and expects them to be part of the return value adjustment that need
to be changed into tail recursion additions/multiplications.
process_assignment does some verification and has a way to tell the caller
to try to move dead or whatever other stmts that don't participate in the
return value modifications before it is returned.
For binary rhs assignments it is just fine, neither op0 nor op1 will be
NULL_TREE and thus if *ass_var is NULL_TREE, it will not match, but unary
rhs is handled by only setting op0 to rhs1 and setting op1 to NULL_TREE.
And at this point, NULL_TREE == NULL_TREE and thus we think e.g. the
  c_2 = -e_3(D);
dead stmt is actually a return value modification, so we queue it as
multiplication and then create a void type SSA_NAME accumulator for it
and ICE shortly after.

Fixed by making sure op1 == *ass_var comparison is done only if *ass_var.

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

PR tree-optimization/94001
* tree-tailcall.c (process_assignment): Before comparing op1 to
*ass_var, verify *ass_var is non-NULL.

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

5 years ago[testsuite] Fix PR94019 to check vector char when vect_hw_misalign
Kewen Lin [Mon, 9 Mar 2020 02:55:11 +0000 (21:55 -0500)] 
[testsuite] Fix PR94019 to check vector char when vect_hw_misalign

As PR94019 shows, without misaligned vector access support but with
realign load, the vectorized loop will end up with realign scheme.
It generates mask (control vector) with return type vector signed
char which breaks the not check.

gcc/testsuite/ChangeLog

2020-03-17  Kewen Lin  <linkw@gcc.gnu.org>

    Backport from master
    2020-03-09  Kewen Lin  <linkw@gcc.gnu.org>

    PR testsuite/94019
    * gcc.dg/vect/vect-over-widen-17.c: Don't expect vector char if it's
    without misaligned vector access support.

5 years ago[testsuite] Fix PR94023 to guard case under vect_hw_misalign
Kewen Lin [Mon, 9 Mar 2020 02:34:13 +0000 (21:34 -0500)] 
[testsuite] Fix PR94023 to guard case under vect_hw_misalign

As PR94023 shows, the expected SLP requires misaligned vector access
support.  This patch is to guard the check under the target condition
vect_hw_misalign to ensure that.

2020-03-17  Kewen Lin  <linkw@gcc.gnu.org>

    Backport from master
    2020-03-09  Kewen Lin  <linkw@gcc.gnu.org>

    PR testsuite/94023
    * gcc.dg/vect/slp-perm-12.c: Expect loop vectorized messages only on
    vect_hw_misalign targets.

5 years agoDaily bump.
GCC Administrator [Tue, 17 Mar 2020 00:17:21 +0000 (00:17 +0000)] 
Daily bump.

5 years agolibstdc++: Add default constructor to net::service_already_exists (PR 94199)
Jonathan Wakely [Mon, 16 Mar 2020 22:55:48 +0000 (22:55 +0000)] 
libstdc++: Add default constructor to net::service_already_exists (PR 94199)

The service_already_exists exception type specified in the TS doesn't
have any constructors defined. Since its base class isn't default
constructible, that means has no usable constructors. This may be a
defect in the TS.

This patch fixes it by adding a default constructor, but making it
private. The make_service function is declared as a friend to be able to
call that private constructor.

Backport from mainline
2020-03-16  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/94199
* include/experimental/executor (service_already_exists): Add default
constructor. Declare make_service to be a friend.
* testsuite/experimental/net/execution_context/make_service.cc: New
test.

5 years agoDaily bump.
GCC Administrator [Mon, 16 Mar 2020 00:17:28 +0000 (00:17 +0000)] 
Daily bump.

5 years agoc++: Find parameter pack in typedef in lambda [92909].
Jason Merrill [Sat, 14 Mar 2020 21:10:39 +0000 (17:10 -0400)] 
c++: Find parameter pack in typedef in lambda [92909].

find_parameter_packs_r doesn't look through typedefs, which is normally
correct, but that means we need to handle their declarations specially.

gcc/cp/ChangeLog
2020-03-14  Jason Merrill  <jason@redhat.com>

PR c++/92909
* pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk
DECL_ORIGINAL_TYPE of a typedef.

5 years agoc++: Fix ICE-after-error on partial spec [92068]
Jason Merrill [Sat, 14 Mar 2020 21:10:39 +0000 (17:10 -0400)] 
c++: Fix ICE-after-error on partial spec [92068]

Here the template arguments for the partial specialization are valid
arguments for the template, but not for a partial specialization, because
'd' can never be deduced to anything other than an empty pack.

gcc/cp/ChangeLog
2020-03-14  Jason Merrill  <jason@redhat.com>

PR c++/92068
* pt.c (process_partial_specialization): Error rather than crash on
extra pack expansion.

5 years agoc++: Fix CTAD with multiple-arg ctor template [93248].
Jason Merrill [Sat, 14 Mar 2020 21:10:39 +0000 (17:10 -0400)] 
c++: Fix CTAD with multiple-arg ctor template [93248].

When cp_unevaluated_operand is set, tsubst_decl thinks that if it sees a
PARM_DECL that isn't already in local_specializations, we're in a decltype
in a trailing return type or some such, and so we only want a substitution
for a single PARM_DECL.  In this case, we want the whole chain, so make sure
cp_unevaluated_operand is cleared.

gcc/cp/ChangeLog
2020-03-14  Jason Merrill  <jason@redhat.com>

PR c++/93248
* pt.c (build_deduction_guide): Clear cp_unevaluated_operand for
substituting DECL_ARGUMENTS.

5 years agoDaily bump.
GCC Administrator [Sun, 15 Mar 2020 00:17:26 +0000 (00:17 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sat, 14 Mar 2020 00:17:41 +0000 (00:17 +0000)] 
Daily bump.

5 years agoFix wrong year in ChangeLog.
Eric Botcazou [Fri, 13 Mar 2020 17:03:41 +0000 (18:03 +0100)] 
Fix wrong year in ChangeLog.

5 years agotree-optimization/94163 constrain alignment set by PRE
Richard Biener [Fri, 13 Mar 2020 12:56:26 +0000 (13:56 +0100)] 
tree-optimization/94163 constrain alignment set by PRE

This avoids HWI -> unsigned truncation to end up with zero alignment
which set_ptr_info_alignment ICEs on.

2020-03-13  Richard Biener  <rguenther@suse.de>

PR tree-optimization/94163
* tree-ssa-pre.c (create_expression_by_pieces): Check
whether alignment would be zero.

5 years agoFix incorrect filling of delay slots in branchy code at -O2
Eric Botcazou [Fri, 13 Mar 2020 08:58:44 +0000 (09:58 +0100)] 
Fix incorrect filling of delay slots in branchy code at -O2

The issue is that relax_delay_slots can streamline the CFG in some cases,
in particular remove BARRIERs, but removing BARRIERs changes the way the
instructions are associated with (basic) blocks by the liveness analysis
code in resource.c (find_basic_block) and thus can cause entries in the
cache maintained by resource.c to become outdated, thus producing wrong
answers downstream.

The fix is to invalidate the cache entries affected by the removal of
BARRIERs in relax_delay_slots, i.e. for the instructions down to the
next BARRIER.

PR rtl-optimization/94119
* resource.h (clear_hashed_info_until_next_barrier): Declare.
* resource.c (clear_hashed_info_until_next_barrier): New function.
* reorg.c (add_to_delay_list): Fix formatting.
(relax_delay_slots): Call clear_hashed_info_until_next_barrier on
the next instruction after removing a BARRIER.

5 years agoDaily bump.
GCC Administrator [Fri, 13 Mar 2020 00:17:19 +0000 (00:17 +0000)] 
Daily bump.

5 years agors6000: Fix -mpower9-vector -mno-altivec ICE (PR87560)
Bill Schmidt [Thu, 12 Mar 2020 20:28:50 +0000 (15:28 -0500)] 
rs6000: Fix -mpower9-vector -mno-altivec ICE (PR87560)

PR87560 reports an ICE when a test case is compiled with -mpower9-vector
and -mno-altivec.  This patch terminates compilation with an error when
this combination (and other unreasonable ones) are requested.

Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
regressions.  Reported error is now:

f951: Error: '-mno-altivec' turns off '-mpower9-vector'

2020-03-12  Bill Schmidt  <wschmidt@linux.ibm.com>

Backport from master
2020-03-02  Bill Schmidt  <wschmidt@linux.ibm.com>

PR target/87560
* rs6000-cpus.def (OTHER_ALTIVEC_MASKS): New #define.
* rs6000.c (rs6000_disable_incompatible_switches): Add table entry
for OPTION_MASK_ALTIVEC.

5 years agolibstdc++: Handle type-changing path concatenations (PR 94063)
Jonathan Wakely [Thu, 12 Mar 2020 17:39:05 +0000 (17:39 +0000)] 
libstdc++: Handle type-changing path concatenations (PR 94063)

The filesystem::path::operator+= and filesystem::path::concat functions
operate directly on the native format of the path and so can cause a
path to mutate to a completely different type.

For Windows combining a filename "x" with a filename ":" produces a
root-name "x:". Similarly, a Cygwin root-directory "/" combined with a
root-directory and filename "/x" produces a root-name "//x".

Before this patch the implemenation didn't support those kind of
mutations, assuming that concatenating two filenames would always
produce a filename and concatenating with a root-dir would still have a
root-dir.

This patch fixes it simply by checking for the problem cases and
creating a new path by re-parsing the result of the string
concatenation. This is slightly suboptimal because the argument has
already been parsed if it's a path, but more importantly it doesn't
reuse any excess capacity that the path object being modified might
already have allocated.

Backport from mainline
2020-03-09  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/94063
* src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
handle concatenations that change the type of the first component.
(path::operator+=(basic_string_view<value_type>)): Likewise.
* testsuite/27_io/filesystem/path/concat/94063.cc: New test.

5 years agolibstdc++: Fix name of macro in #undef directive
Jonathan Wakely [Thu, 12 Mar 2020 17:39:05 +0000 (17:39 +0000)] 
libstdc++: Fix name of macro in #undef directive

The macro that is defined is _GLIBCXX_NOT_FN_CALL_OP but the macro that
was named in the #undef directive was _GLIBCXX_NOT_FN_CALL. This fixes
the #undef.

Backport from mainline
2020-02-04  Jonathan Wakely  <jwakely@redhat.com>

* include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
use.

5 years agolibstdc++: Fix test failure due to -Wnonnull warnings
Jonathan Wakely [Thu, 12 Mar 2020 17:39:05 +0000 (17:39 +0000)] 
libstdc++: Fix test failure due to -Wnonnull warnings

This test fails in the Fedora RPM build (but not elsewhere, for unknown
reasons). The warning is correct, we're passing a null pointer.

Backport from mainline
2020-03-12  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
a null pointer to functions with nonnull(1) attribute.