]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years agoopenmp: Fix up !$omp target parallel handling
Jakub Jelinek [Wed, 22 Jan 2020 17:07:03 +0000 (18:07 +0100)] 
openmp: Fix up !$omp target parallel handling

The PR93329 fix revealed we ICE on !$omp target parallel, this change fixes
that.

2020-01-22  Jakub Jelinek  <jakub@redhat.com>

* parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
* trans-openmp.c (gfc_trans_omp_target)
<case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.

* gfortran.dg/gomp/target-parallel1.f90: New test.
* gfortran.dg/goacc/pr93329.f90: Enable commented out target parallel
test.

5 years agoopenmp: Teach omp_code_to_statement about rest of OpenMP statements
Jakub Jelinek [Wed, 22 Jan 2020 17:05:49 +0000 (18:05 +0100)] 
openmp: Teach omp_code_to_statement about rest of OpenMP statements

The omp_code_to_statement function added with the initial OpenACC support
only handled small subset of the OpenMP statements, leading to ICE if
any other OpenMP directive appeared inside of OpenACC directive.

2020-01-22  Jakub Jelinek  <jakub@redhat.com>

PR fortran/93329
* openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
cases.

* gfortran.dg/goacc/pr93329.f90: New test.

5 years agoriscv: Fix up riscv_rtx_costs for RTL checking (PR target/93333)
Jakub Jelinek [Wed, 22 Jan 2020 16:55:23 +0000 (17:55 +0100)] 
riscv: Fix up riscv_rtx_costs for RTL checking (PR target/93333)

As mentioned in the PR, during combine rtx_costs can be called sometimes
even on RTL that has not been validated yet and so can contain even operands
that aren't valid in any instruction.

2020-01-21  Jakub Jelinek  <jakub@redhat.com>

PR target/93333
* config/riscv/riscv.c (riscv_rtx_costs) <case ZERO_EXTRACT>: Verify
the last two operands are CONST_INT_P before using them as such.

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

5 years agopowerpc: Fix ICE with fp conditional move (PR target/93073)
Jakub Jelinek [Wed, 22 Jan 2020 16:54:32 +0000 (17:54 +0100)] 
powerpc: Fix ICE with fp conditional move (PR target/93073)

The following testcase ICEs, because for TFmode the particular subtraction
pattern (*subtf3) is not enabled with the given options.  Using
expand_simple_binop instead of emitting the subtraction by hand just moves
the ICE one insn later, NEG of ABS is not then recognized, etc., but
ultimately the problem is that when rs6000_emit_cmove is called for floating
point operand mode (and earlier condition ensures that in that case
compare_mode is also floating point), the expander makes sure the
operand mode is SFDF, but for the comparison mode nothing checks it, yet
there is just one *fsel* pattern with 2 separate SFDF iterators.

The following patch fixes it by giving up if compare_mode is not SFmode or
DFmode.

2020-01-21  Jakub Jelinek  <jakub@redhat.com>

PR target/93073
* config/rs6000/rs6000.c (rs6000_emit_cmove): If using fsel, punt for
compare_mode other than SFmode or DFmode.

* gcc.target/powerpc/pr93073.c: New test.

5 years agoc++: Fix deprecated attribute handling on templates (PR c++/93228)
Jakub Jelinek [Wed, 22 Jan 2020 16:52:11 +0000 (17:52 +0100)] 
c++: Fix deprecated attribute handling on templates (PR c++/93228)

As the following testcase shows, when deprecated attribute is on a template,
we'd never print the message if any, because the attribute is not
present on the TEMPLATE_DECL with which warn_deprecated_use is called,
but on its DECL_TEMPLATE_RESULT or its type.

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

PR c++/93228
* parser.c (cp_parser_template_name): Look up deprecated attribute
in DECL_TEMPLATE_RESULT or its type's attributes.

* g++.dg/cpp1y/attr-deprecated-3.C: New test.

5 years agoi386: Fix wrong-code x86 issue with avx512{f,vl} fma PR93009
Jakub Jelinek [Wed, 22 Jan 2020 16:51:14 +0000 (17:51 +0100)] 
i386: Fix wrong-code x86 issue with avx512{f,vl} fma PR93009

As mentioned in the PR, the following testcase is miscompiled with avx512vl.
The reason is that the fma *_bcst_1 define_insns have two alternatives:
"=v,v" "0,v" "v,0" "m,m" and use the same
vfmadd213* %3<avx512bcst>, %2, %0<sd_mask_op4>
pattern.  If the first alternative is chosen, everything is ok, but if the
second alternative is chosen, %2 and %0 are the same register, so instead
of doing dest=dest*another+membcst we do dest=dest*dest+membcst.
Now, to fix this, either we'd need separate:
  "vfmadd213<ssemodesuffix>\t{%3<avx512bcst>, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<avx512bcst>}
   vfmadd213<ssemodesuffix>\t{%3<avx512bcst>, %1, %0<sd_mask_op4>|%0<sd_mask_op4>, %1, %3<avx512bcst>}"
where for the second alternative, we'd just use %1 instead of %2, but
what I think is actually cleaner is just use a single alternative and
make the two multiplication operands commutative, which they really are.

2020-01-15  Jakub Jelinek  <jakub@redhat.com>

PR target/93009
* config/i386/sse.md
(*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1,
*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1,
*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1,
*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1): Use
just a single alternative instead of two, make operands 1 and 2
commutative.

* gcc.target/i386/avx512vl-pr93009.c: New test.

5 years agore PR libgomp/93219 (unused return value in affinity-fmt.c)
Jakub Jelinek [Wed, 22 Jan 2020 16:50:14 +0000 (17:50 +0100)] 
re PR libgomp/93219 (unused return value in affinity-fmt.c)

PR libgomp/93219
* libgomp.h (gomp_print_string): Change return type from void to int.
* affinity-fmt.c (gomp_print_string): Likewise.  Return true if
not all characters have been written.

5 years agore PR inline-asm/93202 ([RISCV] ICE when using inline asm 'h' operand modifier)
Jakub Jelinek [Wed, 22 Jan 2020 16:49:38 +0000 (17:49 +0100)] 
re PR inline-asm/93202 ([RISCV] ICE when using inline asm 'h' operand modifier)

PR inline-asm/93202
* config/riscv/riscv.c (riscv_print_operand_reloc): Use
output_operand_lossage instead of gcc_unreachable.
* doc/md.texi (riscv f constraint): Fix typo.

* gcc.target/riscv/pr93202.c: New test.

5 years agore PR rtl-optimization/93088 (Compile time hog on gcc/testsuite/gcc.target/i386/pr563...
Jakub Jelinek [Wed, 22 Jan 2020 16:48:48 +0000 (17:48 +0100)] 
re PR rtl-optimization/93088 (Compile time hog on gcc/testsuite/gcc.target/i386/pr56348.c w/ -O3 -funroll-loops -fno-tree-dominator-opts -fno-tree-vrp)

PR rtl-optimization/93088
* loop-iv.c (find_single_def_src): Punt after looking through
128 reg copies for regs with single definitions.  Move definitions
to first uses.

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

5 years agore PR ipa/93087 (Bogus `-Wsuggest-attribute=cold` on function already marked as ...
Jakub Jelinek [Wed, 22 Jan 2020 16:48:05 +0000 (17:48 +0100)] 
re PR ipa/93087 (Bogus `-Wsuggest-attribute=cold` on function already marked as `__attribute__((cold))`)

PR ipa/93087
* predict.c (compute_function_frequency): Don't call
warn_function_cold on functions that already have cold attribute.

* c-c++-common/cold-1.c: New test.

5 years agore PR libgomp/93065 (libgomp: destructor missing to delete goacc_cleanup_key)
Jakub Jelinek [Wed, 22 Jan 2020 16:42:45 +0000 (17:42 +0100)] 
re PR libgomp/93065 (libgomp: destructor missing to delete goacc_cleanup_key)

PR libgomp/93065
* oacc-init.c (goacc_runtime_deinitialize): New function.

5 years agore PR c++/92438 (Function declaration parsed incorrectly with `-std=c++1z`)
Jakub Jelinek [Wed, 22 Jan 2020 16:42:02 +0000 (17:42 +0100)] 
re PR c++/92438 (Function declaration parsed incorrectly with `-std=c++1z`)

PR c++/92438
* parser.c (cp_parser_constructor_declarator_p): If open paren
is followed by RID_ATTRIBUTE, skip over the attribute tokens and
try to parse type specifier.

* g++.dg/ext/attrib61.C: New test.

5 years agore PR c++/92992 (Side-effects dropped when decltype(nullptr) typed expression is...
Jakub Jelinek [Wed, 22 Jan 2020 16:39:55 +0000 (17:39 +0100)] 
re PR c++/92992 (Side-effects dropped when decltype(nullptr) typed expression is passed to ellipsis)

PR c++/92992
* call.c (convert_arg_to_ellipsis): For decltype(nullptr) arguments
that have side-effects use cp_build_compound_expr.

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

5 years agoFix ICE with cast of division by zero (PR c/93348).
Joseph Myers [Wed, 22 Jan 2020 17:26:10 +0000 (17:26 +0000)] 
Fix ICE with cast of division by zero (PR c/93348).

Bug 93348 reports an ICE on certain cases of casts of expressions that
may appear only in unevaluated parts of integer constant expressions,
arising from the generation of nested C_MAYBE_CONST_EXPRs.  This patch
fixes it by adding a call to remove_c_maybe_const_expr in the
integer-operands case, as is done in other similar cases.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

PR c/93348
gcc/c:
* c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
argument with integer operands.

gcc/testsuite:
* gcc.c-torture/compile/pr93348-1.c: New test.

(cherry picked from commit ac68e287fc2e939ae6b45ba7ff04e493982b7f62)

5 years agoDaily bump.
GCC Administrator [Wed, 22 Jan 2020 00:18:31 +0000 (00:18 +0000)] 
Daily bump.

5 years agoBug 93234 - INQUIRE on pre-assigned files of ROUND and SIGN properties fails
Jerry DeLisle [Tue, 21 Jan 2020 23:35:42 +0000 (15:35 -0800)] 
Bug 93234 - INQUIRE on pre-assigned files of ROUND and SIGN properties fails

2020-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        Backport from mainline
PR libfortran/93234
* io/unit.c (set_internal_unit): Set round and sign flags
correctly.

* gfortran.dg/inquire_pre.f90: New test.

5 years agoPR c++/91476 - anon-namespace reference temp clash between TUs.
Jason Merrill [Mon, 20 Jan 2020 19:09:03 +0000 (14:09 -0500)] 
PR c++/91476 - anon-namespace reference temp clash between TUs.

* call.c (make_temporary_var_for_ref_to_temp): Clear TREE_PUBLIC
if DECL is in the anonymous namespace.

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

5 years agoUpdate GCC zh_TW.po.
Joseph Myers [Mon, 20 Jan 2020 18:57:25 +0000 (18:57 +0000)] 
Update GCC zh_TW.po.

* zh_TW.po: Update.

5 years ago[PATCH] PR Fortran/93263 Correct test case
Mark Eggleston [Mon, 20 Jan 2020 13:29:33 +0000 (13:29 +0000)] 
[PATCH] PR Fortran/93263 Correct test case

Should've have checked for the existance of a non static integer
using scan-tree-dump instead of scan-tree-dump-not. A cut and paste
error.

5 years agoPR middle-end/93246 - missing alias subsets
Richard Biener [Tue, 14 Jan 2020 07:43:32 +0000 (08:43 +0100)] 
PR middle-end/93246 - missing alias subsets

Starting with the introduction of TYPE_TYPELESS_STORAGE the situation
of having a alias-set zero aggregate field became more common which
prevents recording alias-sets of fields of said aggregate as subset
of the outer aggregate.  component_uses_parent_alias_set_from in the
past fended off some of the issues with that but the alias oracles
use of the alias set of the base of an access path never appropriately
handled it.

The following makes it so that alias-sets of fields of alias-set zero
aggregate fields are still recorded as subset of the container.

2020-01-14  Richard Biener  <rguenther@suse.de>

PR middle-end/93246
* alias.c (record_component_aliases): Take superset to record
into, recurse for alias-set zero fields.
(record_component_aliases): New oveerload wrapping around the above.

* g++.dg/torture/pr93246.C: New testcase.

5 years agoBackport f48c6014133c8989702458f9082e34ba6dd326d4
Martin Liska [Mon, 20 Jan 2020 11:11:20 +0000 (12:11 +0100)] 
Backport f48c6014133c8989702458f9082e34ba6dd326d4

Backport from mainline
2020-01-16  Martin Liska  <mliska@suse.cz>

* lto-partition.c (lto_balanced_map): Remember
best_noreorder_pos and then restore to it
when we revert.

5 years agoClean up references to Subversion in documentation sources.
Eric S. Raymond [Mon, 20 Jan 2020 02:10:52 +0000 (18:10 -0800)] 
Clean up references to Subversion in documentation sources.

Clean up references to SVN in in the GCC docs, redirecting to Git
documentation as appropriate.

Where references to "the source code repository" rather than a
specific VCS make sense, I have used them. You might, after
all, change VCSes again someday.

I have not modified either generated HTML files nor maintainer scripts.
These changes should be complete with repect to the documentation tree.

2020-01-19  Eric S. Raymond <esr@thyrsus.com>
    Sandra Loosemore  <sandra@codesourcery.com>

Partial backport from mainline:

2020-01-19  Eric S. Raymond <esr@thyrsus.com>

gcc/
* doc/contribute.texi: Update for SVN -> Git transition.
* doc/install.texi: Likewise.

libstdc++-v3
* doc/xml/faq.xml: Update for SVN -> Git transition.
* doc/xml/manual/appendix_contributing.xml: Likewise.

5 years agoDaily bump.
GCC Administrator [Mon, 20 Jan 2020 00:18:27 +0000 (00:18 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sun, 19 Jan 2020 00:18:27 +0000 (00:18 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sat, 18 Jan 2020 00:18:36 +0000 (00:18 +0000)] 
Daily bump.

5 years agoPR c++/92531 - ICE with noexcept(lambda).
Jason Merrill [Fri, 17 Jan 2020 13:37:49 +0000 (08:37 -0500)] 
PR c++/92531 - ICE with noexcept(lambda).

This was failing because uses_template_parms didn't recognize LAMBDA_EXPR as
a kind of expression.  Instead of trying to enumerate all the different
varieties of expression and then aborting if what's left isn't
error_mark_node, let's handle error_mark_node and then assume anything else
is an expression.

* pt.c (uses_template_parms): Don't try to enumerate all the
expression cases.

5 years agoPR c++/93286 - ICE with __is_constructible and variadic template.
Jason Merrill [Thu, 16 Jan 2020 21:55:39 +0000 (16:55 -0500)] 
PR c++/93286 - ICE with __is_constructible and variadic template.

Here we had been recursing in tsubst_copy_and_build if type2 was a TREE_LIST
because that function knew how to deal with pack expansions, and tsubst
didn't.  But tsubst_copy_and_build expects to be dealing with expressions,
so we crash when trying to convert_from_reference a type.

* pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
(tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.

5 years agoFortran: PR93263 -fno-automatic and RECURSIVE
Mark Eggleston [Fri, 17 Jan 2020 09:44:23 +0000 (09:44 +0000)] 
Fortran: PR93263 -fno-automatic and RECURSIVE

The use of -fno-automatic should not affect the save attribute of a
recursive procedure. The first test case checks unsaved variables
and the second checks saved variables.

5 years agoDaily bump.
GCC Administrator [Fri, 17 Jan 2020 00:18:53 +0000 (00:18 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Thu, 16 Jan 2020 00:18:44 +0000 (00:18 +0000)] 
Daily bump.

5 years agoFix setting of DECL_CONTEXT in pushdecl (PR c/93072).
Joseph Myers [Wed, 15 Jan 2020 20:52:45 +0000 (20:52 +0000)] 
Fix setting of DECL_CONTEXT in pushdecl (PR c/93072).

Bug 93072 is a case where the C front end (a) wrongly interprets an
inline declaration at block scope as indicating that DECL_CONTEXT
should be set for an inline function and (b) this results in an ICE.
This is a regression resulting from a previous fix of mine for other
bugs involving such declarations being wrongly interpreted elsewhere
as nested function declarations.  The fix is similar to the previous
fix: use TREE_PUBLIC instead of DECL_EXTERNAL in another place as the
relevant test to determine whether to set DECL_CONTEXT.  (When a
variable reaches the code in question in pushdecl, the two are
equivalent.)

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

PR c/93072
gcc/c:
* c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
determine whether to set DECL_CONTEXT.

gcc/testsuite:
* gcc.dg/inline-42.c, gcc.dg/inline-43.c: New tests.

(cherry picked from commit e2346a33b05871fc065815d4cfd531dfa0195507)

5 years agoPR target/93254 - -msse generates sse2 instructions
Uros Bizjak [Wed, 15 Jan 2020 19:22:39 +0000 (20:22 +0100)] 
PR target/93254 - -msse generates sse2 instructions

PR target/93254
* config/i386/i386.md (*movsf_internal): Require SSE2 ISA for
alternatives 9 and 10.  Do not require SSE2 ISA for alternatives
14 and 15.

5 years agoDaily bump.
GCC Administrator [Wed, 15 Jan 2020 00:18:42 +0000 (00:18 +0000)] 
Daily bump.

5 years agoIPA: Avoid segfault in devirtualization_time_bonus (PR 93223)
Martin Jambor [Tue, 14 Jan 2020 18:05:56 +0000 (19:05 +0100)] 
IPA: Avoid segfault in devirtualization_time_bonus (PR 93223)

2020-01-14  Martin Jambor  <mjambor@suse.cz>

PR ipa/93223
* ipa-cp.c (devirtualization_time_bonus): Check whether isummary is
NULL.

testsuite/
* g++.dg/ipa/pr93223.C: New test.

5 years agoDaily bump.
GCC Administrator [Tue, 14 Jan 2020 00:18:50 +0000 (00:18 +0000)] 
Daily bump.

5 years agoFix handling of overflow in C casts in integer constant expressions (PR c/93241).
Joseph Myers [Tue, 14 Jan 2020 00:13:21 +0000 (00:13 +0000)] 
Fix handling of overflow in C casts in integer constant expressions (PR c/93241).

Bug 93241 reports a case where certain C expressions involving casts,
that would not be valid in an evaluated part of an integer constant
expression (because of e.g. involving integer overflow), are wrongly
rejected in an unevaluated part of an integer constant expression even
though all the operands and operations are ones that are valid in that
context.  This is a rejects-valid regression in GCC 4.5 and later
relative to 4.4 (for some testcases; the one in the bug uses
_Static_assert which isn't supported in those older releases).

The rule in the C front end is that an expression with those
properties (valid in an unevaluated part of an integer constant
expression but not an evaluated part) must be represented either as an
INTEGER_CST with TREE_OVERFLOW set or as a C_MAYBE_CONST_EXPR with
C_MAYBE_CONST_EXPR_INT_OPERANDS set.  This patch fixes build_c_cast to
check for that case and call note_integer_operands as needed.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

PR c/93241
gcc/c:
* c-typeck.c (build_c_cast): Check for expressions with integer
operands that can occur in an unevaluated part of an integer
constant expression and call note_integer_operands as needed.

gcc/testsuite:
* gcc.dg/c11-static-assert-10.c, gcc.dg/c99-const-expr-15.c: New
tests.

(cherry picked from commit 3d77686d2eddf76d3498169d0ca5653db45a8662)

5 years agoBuild filesystem library with large file support
Jonathan Wakely [Thu, 9 Jan 2020 13:38:43 +0000 (13:38 +0000)] 
Build filesystem library with large file support

Enable AC_SYS_LARGEFILE to set the macros needed for large file APIs to
be used by default. We do not want to define those macros in the
public headers that users include. The values of the macros are copied
to a separate file that is only included by the filesystem sources
during the build, and then the macros in <bits/c++config.h> are renamed
so that they don't have any effect in user code including our headers.

Also use larger type for result of filesystem::file_size to avoid
truncation of large values on 32-bit systems (PR 91947).

Backport from mainlne
2019-10-04  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/81091
PR libstdc++/91947
* configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
* config.h.in: Regenerate:
* configure: Regenerate:
* include/Makefile.am (${host_builddir}/largefile-config.h): New
target to generate config header for filesystem library.
(${host_builddir}/c++config.h): Rename macros for large file support.
* include/Makefile.in: Regenerate.
* src/c++17/fs_dir.cc: Include new config header.
* src/c++17/fs_ops.cc: Likewise.
(filesystem::file_size): Use uintmax_t for size.
* src/filesystem/dir.cc: Include new config header.
* src/filesystem/ops.cc: Likewise.
(experimental::filesystem::file_size): Use uintmax_t for size.

5 years agoFix libdecnumber handling of non-canonical BID significands (PR middle-end/91226).
Joseph Myers [Mon, 13 Jan 2020 18:45:04 +0000 (18:45 +0000)] 
Fix libdecnumber handling of non-canonical BID significands (PR middle-end/91226).

As reported in bug 91226, the libdecnumber code used on the host to
interpret DFP values in the BID encoding fails, for _Decimal64 and
_Decimal128, to check for the case where a significand is too large
and so specified in IEEE 754 to be a non-canonical encoding of the
zero significand.  This patch adds the required handling of that case,
together with tests both using -O2 (testing this host code) and -O0
(testing libgcc code, which already worked before the patch); the
tests also cover _Decimal32, which already had the required check.

In the _Decimal128 case, where the code previously completely ignored
the case where the first four bits of the combination field are 1100,
1101 or 1110, the logic for determining the correct quantum exponent
in that case is also newly added by this patch, so tests are added for
that as well (again, libgcc already handled it correctly when the
conversion was done at runtime rather than at compile time).

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

PR middle-end/91226
libdecnumber:
* bid/bid2dpd_dpd2bid.c (_bid_to_dpd64): Handle non-canonical
significands.
(_bid_to_dpd128): Likewise.  Check for case where combination
field starts 1100, 1101 or 1110.

gcc/testsuite:
* gcc.dg/dfp/bid-non-canonical-d128-1.c,
gcc.dg/dfp/bid-non-canonical-d128-2.c,
gcc.dg/dfp/bid-non-canonical-d128-3.c,
gcc.dg/dfp/bid-non-canonical-d128-4.c,
gcc.dg/dfp/bid-non-canonical-d32-1.c,
gcc.dg/dfp/bid-non-canonical-d32-2.c,
gcc.dg/dfp/bid-non-canonical-d64-1.c,
gcc.dg/dfp/bid-non-canonical-d64-2.c: New tests.

(cherry picked from commit 0fad54f0a88160e81c3150b63c91fd9809665474)

5 years agolibstdc++: Fix documentation claiming to refer to mainline
Jonathan Wakely [Mon, 13 Jan 2020 16:25:01 +0000 (16:25 +0000)] 
libstdc++: Fix documentation claiming to refer to mainline

* doc/xml/manual/status_cxx1998.xml: Replace incorrect statement
about documenting mainline.
* doc/xml/manual/status_cxx2011.xml: Likewise.
* doc/xml/manual/status_cxx2014.xml: Likewise.
* doc/xml/manual/status_cxx2017.xml: Likewise.
* doc/xml/manual/status_cxx2020.xml: Likewise.
* doc/xml/manual/status_cxxtr1.xml: Likewise.
* doc/xml/manual/status_cxxtr24733.xml: Likewise.
* doc/html/*: Regenerate.

5 years agoUpdate gcc_release to mainline version.
Joseph Myers [Mon, 13 Jan 2020 15:58:45 +0000 (15:58 +0000)] 
Update gcc_release to mainline version.

Will be needed for building subsequent releases on this branch from
git.

Backport:

2020-01-13  Joseph Myers  <joseph@codesourcery.com>

* gcc_release: Use git instead of SVN.

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

* gcc_release: Use https for gcc.gnu.org.

5 years agoDaily bump.
GCC Administrator [Mon, 13 Jan 2020 12:38:15 +0000 (12:38 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sat, 11 Jan 2020 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r280154

5 years agoIPA-CP: Remove bogus static keyword (PR 92971)
Martin Jambor [Fri, 10 Jan 2020 19:30:56 +0000 (20:30 +0100)] 
IPA-CP: Remove bogus static keyword (PR 92971)

2020-01-10  Martin Jambor  <mjambor@suse.cz>

Backport from mainline
2019-12-17  Martin Jambor  <mjambor@suse.cz>

        PR ipa/92971
        * Ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Fix
          definition of values, release memory on exit.

        testsuite/
        * gcc.dg/ipa/ipcp-agg-12.c: New test.

From-SVN: r280131

5 years agobackport: arm: Fix rmprofile multilibs when architecture includes +mp or +sec (PR...
Przemyslaw Wirkus [Fri, 10 Jan 2020 16:50:15 +0000 (16:50 +0000)] 
backport: arm: Fix rmprofile multilibs when architecture includes +mp or +sec (PR target/93188)

When only the rmprofile multilibs are built, compiling for armv7-a
should select the generic v7 multilibs.  This used to work before +sec
and +mp were added to the architecture options but it was broken by
that update.  This patch fixes those variants and adds some tests to
ensure that they remain fixed

gcc/ChangeLog:
2020-01-10  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

Backport from trunk
PR target/93188
* config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
when only building rm-profile multilibs.

gcc/testsuite/ChangeLog:
2020-01-10  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

Backport from trunk
* gcc.target/arm/multilib.exp: Add new tests for rm-profile only.

From-SVN: r280123

5 years agobackport: arm: fix v[78]-r multilibs when configured with --with-multlib-list=aprofile
Przemyslaw Wirkus [Fri, 10 Jan 2020 16:46:42 +0000 (16:46 +0000)] 
backport: arm: fix v[78]-r multilibs when configured with --with-multlib-list=aprofile

When gcc for Arm is configured with --with-multilib-list=aprofile a
misplaced endif directive in the makefile was causing the arm->thumb
mapping for multilibs to be omitted from the reuse rules.  This
resulted in the default multilib being picked rather than the thumb2
opimized version.

2020-01-10  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

Backport from trunk
* config/arm/t-multilib: Use arm->thumb multilib reuse rules
on a-profile.

From-SVN: r280122

5 years agoFortran] PR84135 fix merging dimension into codimension array spec
Tobias Burnus [Fri, 10 Jan 2020 14:37:29 +0000 (15:37 +0100)] 
Fortran] PR84135 fix merging dimension into codimension array spec

        Backported from mainline
        2020-01-09  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/84135
        * array.c (gfc_set_array_spec): Fix shifting of codimensions
        when adding a dimension.
        * decl.c (merge_array_spec): Ditto. Fix using correct codimensions.

        Backported from mainline
        2020-01-09  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/84135
        * gfortran.dg/coarray/codimension_3.f90: New.

From-SVN: r280110

5 years agoDaily bump.
GCC Administrator [Fri, 10 Jan 2020 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r280095

5 years agolibstdc++: Define memory resource key functions non-inline (PR93208)
Jonathan Wakely [Thu, 9 Jan 2020 13:18:37 +0000 (13:18 +0000)] 
libstdc++: Define memory resource key functions non-inline (PR93208)

This prevents the vtables and RTTI from being emitted in every object
file that uses memory_resource and monotonic_buffer_resource.

Objects compiled by GCC 9.1 or 9.2 will contain inline definitions of
the destructors, vtable and RTTI, but this is harmless. The inline
definitions have identical effects to the ones that are now defined in
libstdc++.so so it doesn't matter if the inline ones are used instead of
calling the symbols exported from the runtime library.

PR libstdc++/93208
* config/abi/pre/gnu.ver: Add new exports.
* include/std/memory_resource (memory_resource::~memory_resource()):
Do not define inline.
(monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
* src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
Define.
(monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
* testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.

From-SVN: r280045

5 years agoBackport r279306
Martin Liska [Thu, 9 Jan 2020 10:33:28 +0000 (11:33 +0100)] 
Backport r279306

2020-01-09  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-12-12  Jan Hubicka  <hubicka@ucw.cz>

* ipa-prop.c (read_ipcp_transformation_info): Fix undefined ordering
of execution of function call parameters.

From-SVN: r280037

5 years agoDaily bump.
GCC Administrator [Thu, 9 Jan 2020 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r280023

5 years agolibstdc++: Fix error handling in filesystem::remove_all (PR93201)
Jonathan Wakely [Wed, 8 Jan 2020 21:48:23 +0000 (21:48 +0000)] 
libstdc++: Fix error handling in filesystem::remove_all (PR93201)

When recursing into a directory, any errors that occur while removing a
directory entry are ignored, because the subsequent increment of the
directory iterator clears the error_code object.

This fixes that bug by checking the result of each recursive operation
before incrementing. This is a change in observable behaviour, because
previously other directory entries would still be removed even if one
(or more) couldn't be removed due to errors. Now the operation stops on
the first error, which is what the code intended to do all along. The
standard doesn't specify what happens in this case (because the order
that the entries are processed is unspecified anyway).

PR libstdc++/93201
* src/c++17/fs_ops.cc (remove_all(const path&, error_code&)): Check
result of recursive call before incrementing iterator.
* src/filesystem/ops.cc (remove_all(const path&, error_code&)):
Likewise.
* testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
are reported correctly.
* testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.

From-SVN: r280020

5 years agobackport: Add -nodevicespecs option for avr.
Georg-Johann Lay [Wed, 8 Jan 2020 09:46:07 +0000 (09:46 +0000)] 
backport: Add -nodevicespecs option for avr.

Backport from 2020-01-08 trunk r279995.

Add -nodevicespecs option for avr.

PR target/93182
* config/avr/avr.opt (-nodevicespecs): New driver option.
* config/avr/driver-avr.c (avr_devicespecs_file): Only issue
"-specs=device-specs/..." if that option is not set.
* doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.

From-SVN: r279996

5 years agocompiler: fix loopdepth tracking in array slicing expression in escape analysis
Ian Lance Taylor [Wed, 8 Jan 2020 00:38:34 +0000 (00:38 +0000)] 
compiler: fix loopdepth tracking in array slicing expression in escape analysis

    In the gc compiler, for slicing an array, its AST has an implicit
    address operation node. There isn't such node in the gofrontend
    AST. During the escape analysis, we create a fake node to mimic
    the gc compiler's behavior. For the fake node, the loopdepth was
    not tracked correctly, causing miscompilation. Since this is an
    address operation, do the same thing as we do for the address
    operator.

    Fixes golang/go#36404.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213643

From-SVN: r279985

5 years agoDaily bump.
GCC Administrator [Wed, 8 Jan 2020 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279982

5 years ago[testsuite, Darwin] Fix failing darwin-version-1.c.
Iain Sandoe [Tue, 7 Jan 2020 21:37:36 +0000 (21:37 +0000)] 
[testsuite, Darwin] Fix failing darwin-version-1.c.

Recent platform linkers will no longer accept linking for a target
OS version less than 10.4. Recent SDKs no longer have the libgcc_s
shims used for 10.4 and 10.5. So we need to adjust tests that expect
these.

2020-01-07  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2020-01-05  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/darwin-version-1.c: Adjust test to use different
options for Darwin4-9 and Darwin10+.

From-SVN: r279975

5 years agoDaily bump.
GCC Administrator [Tue, 7 Jan 2020 00:16:09 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279931

5 years agopa.md: Revert change to use ordered_comparison_operator instead of...
John David Anglin [Mon, 6 Jan 2020 23:52:55 +0000 (23:52 +0000)] 
pa.md: Revert change to use ordered_comparison_operator instead of...

* config/pa/pa.md: Revert change to use ordered_comparison_operator
instead of cmpib_comparison_operator in cmpib patterns.
* config/pa/predicates.md (cmpib_comparison_operator): Revert removal
of cmpib_comparison_operator.  Revise comment.

From-SVN: r279928

5 years agoDaily bump.
GCC Administrator [Mon, 6 Jan 2020 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279891

5 years agoDaily bump.
GCC Administrator [Sun, 5 Jan 2020 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279882

5 years agoDaily bump.
GCC Administrator [Sat, 4 Jan 2020 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279875

5 years agoDaily bump.
GCC Administrator [Fri, 3 Jan 2020 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279851

5 years agore PR c/90677 (gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node'...
Jakub Jelinek [Thu, 2 Jan 2020 17:36:50 +0000 (18:36 +0100)] 
re PR c/90677 (gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node' is not defined as a type)

PR c/90677
* cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name
has not been found, rather than error_mark_node.

* c-c++-common/pr90677-2.c: New test.

From-SVN: r279841

5 years agoDaily bump.
GCC Administrator [Thu, 2 Jan 2020 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279826

5 years agore PR target/67834 (Local references inside comdat groups)
John David Anglin [Wed, 1 Jan 2020 23:00:58 +0000 (23:00 +0000)] 
re PR target/67834 (Local references inside comdat groups)

PR target/67834
* config/pa/pa.c (pa_elf_select_rtx_section): New.  Put references to
COMDAT group function labels in .data.rel.ro.local section.
* config/pa/pa32-linux.h (TARGET_ASM_SELECT_RTX_SECTION): Define.

From-SVN: r279824

5 years agore PR target/93111 (FAIL: gfortran.fortran-torture/compile/pr32663.f, -O3 -g ...
John David Anglin [Wed, 1 Jan 2020 20:57:04 +0000 (20:57 +0000)] 
re PR target/93111 (FAIL: gfortran.fortran-torture/compile/pr32663.f,  -O3 -g   (internal compiler error))

PR target/93111
* config/pa/pa.md (scc): Use ordered_comparison_operator instead of
comparison_operator in B and S integer comparisons.  Likewise, use
ordered_comparison_operator instead of cmpib_comparison_operator in
cmpib patterns.
* config/pa/predicates.md (cmpib_comparison_operator): Remove.

From-SVN: r279819

5 years agobackport: re PR libgomp/93066 (libgomp/target.c:525:46: error: expected expression...
John David Anglin [Wed, 1 Jan 2020 17:01:46 +0000 (17:01 +0000)] 
backport: re PR libgomp/93066 (libgomp/target.c:525:46: error: expected expression before ')' token)

Backport from mainline
2019-12-30  John David Anglin  <danglin@gcc.gnu.org>

PR libgomp/93066
* inclhack.def (hpux_c99_inttypes3): Fix defines for INTPTR_MAX
and UINTPTR_MAX, and missing define for SIZE_MAX.
* fixincl.x: Regenerate.
* tests/base/inttypes.h: Update for above fix.

From-SVN: r279814

5 years agoDaily bump.
GCC Administrator [Wed, 1 Jan 2020 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279807

5 years agoDaily bump.
GCC Administrator [Tue, 31 Dec 2019 00:16:32 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279800

5 years ago* fi.po: Update.
Joseph Myers [Mon, 30 Dec 2019 22:08:59 +0000 (22:08 +0000)] 
* fi.po: Update.

From-SVN: r279789

5 years agobackport: re PR fortran/92961 (ICE in gfc_zero_size_array, at fortran/arith.c:1680)
Thomas Koenig [Mon, 30 Dec 2019 15:27:08 +0000 (15:27 +0000)] 
backport: re PR fortran/92961 (ICE in gfc_zero_size_array, at fortran/arith.c:1680)

2019-12-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
    PR fortran/92961
    * fortran/ChangeLog: Added entry.
    * testsuite/ChangeLog: Added entry.

From-SVN: r279769

5 years agoCatch division by zero errors in array sizes.
Thomas Koenig [Mon, 30 Dec 2019 13:10:37 +0000 (13:10 +0000)] 
Catch division by zero errors in array sizes.

2019-12-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/92961
* gfortran.h (gfc_seen_div0): Add declaration.
* arith.h (gfc_seen_div0): Add definition.
(eval_intrinsic): For integer division by zero, set gfc_seen_div0.
* decl.c (variable_decl):  If resolution resp. simplification
fails for array spec and a division of zero error has been
seen, return MATCH_ERROR.

2019-12-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/92961
* gfortran.dg/arith_divide_2.f90: New test.

From-SVN: r279767

5 years agoDaily bump.
GCC Administrator [Mon, 30 Dec 2019 00:16:09 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279760

5 years agoDaily bump.
GCC Administrator [Sun, 29 Dec 2019 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279750

5 years agoDaily bump.
GCC Administrator [Sat, 28 Dec 2019 00:16:27 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279745

5 years agoDaily bump.
GCC Administrator [Fri, 27 Dec 2019 00:16:29 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279738

5 years agoDaily bump.
GCC Administrator [Thu, 26 Dec 2019 00:16:32 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279734

5 years ago[Darwin, PPC] Use Darwin9 bundle header for Rosetta builds.
Iain Sandoe [Wed, 25 Dec 2019 20:31:04 +0000 (20:31 +0000)] 
[Darwin, PPC] Use Darwin9 bundle header for Rosetta builds.

On Darwin10 it's possible to make a 32b PPC build using the
'Rosetta' emulator. However, these builds need to make use of
Darwin9 crts (for exes, dylibs and bundles). This adds the
change to cater for bundles.

gcc/ChangeLog:

Backport from mainline.
2019-12-14 Iain Sandoe <iain@sandoe.co.uk>

* config/darwin.h (DARWIN_EXTRA_SPECS): Add new
bundle spec. (DARWIN_BUNDLE1_SPEC): New.
(STARTFILE_SPEC): Use darwin bundle spec.
* config/rs6000/darwin.h (DARWIN_BUNDLE1_SPEC): New.
(DARWIN_DYLIB1_SPEC): Delete duplicate.

From-SVN: r279732

5 years agoDaily bump.
GCC Administrator [Wed, 25 Dec 2019 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279729

5 years agoDaily bump.
GCC Administrator [Tue, 24 Dec 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279722

5 years agoDaily bump.
GCC Administrator [Mon, 23 Dec 2019 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279714

5 years agoDaily bump.
GCC Administrator [Sun, 22 Dec 2019 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279704

5 years agore PR fortran/92753 (ICE in gfc_trans_call, at fortran/trans-stmt.c:392)
Paul Thomas [Sat, 21 Dec 2019 18:21:21 +0000 (18:21 +0000)] 
re PR fortran/92753 (ICE in gfc_trans_call, at fortran/trans-stmt.c:392)

2019-12-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/92753
* expr.c (find_inquiry_ref): Catch INQUIRY_LEN case, where the
temporary expression has been converted to a constant and make
the new expression accordingly. Correct the error in INQUIRY_RE
and INQUIRY_IM cases. The original rather than the resolved
expression was being used as the source in mpfr_set.

2019-12-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/92753
* gfortran.dg/inquiry_type_ref_5.f90 : New test.

From-SVN: r279697

5 years agoDaily bump.
GCC Administrator [Sat, 21 Dec 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r279689

5 years agobackport: re PR fortran/92977 (ICE in gfc_trans_omp_atomic, at fortran/trans-openmp...
Jakub Jelinek [Fri, 20 Dec 2019 17:45:56 +0000 (18:45 +0100)] 
backport: re PR fortran/92977 (ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3526)

Backported from mainline
2019-12-19  Jakub Jelinek  <jakub@redhat.com>

  PR fortran/92977
* frontend-passes.c (call_external_blas): Use || instead of |.

PR fortran/92977
* frontend-passes.c (in_omp_atomic): New variable.
(cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
inline_matmul_assign, call_external_blas): Don't optimize in
EXEC_OMP_ATOMIC.
(optimize_namespace): Clear in_omp_atomic.
(gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
it around.

* gfortran.dg/gomp/pr92977.f90: New test.

From-SVN: r279676

5 years agobackport: re PR ipa/92357 (ICE in IPA pass fnsummary in openmp offload)
Jakub Jelinek [Fri, 20 Dec 2019 17:44:50 +0000 (18:44 +0100)] 
backport: re PR ipa/92357 (ICE in IPA pass fnsummary in openmp offload)

Backported from mainline
2019-12-14  Jakub Jelinek  <jakub@redhat.com>

PR ipa/92357
* ipa-fnsummary.c (ipa_fn_summary_write): Use
lto_symtab_encoder_iterator with lsei_start_function_in_partition and
lsei_next_function_in_partition instead of walking all cgraph nodes
in encoder.

From-SVN: r279675

5 years agobackport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_app...
Jakub Jelinek [Fri, 20 Dec 2019 17:44:16 +0000 (18:44 +0100)] 
backport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_apply() calls)

Backported from mainline
2019-12-14  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/92930
* ipa-pure-const.c (special_builtin_state): Don't handle
BUILT_IN_APPLY.

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

From-SVN: r279674

5 years agobackport: re PR target/92904 (varargs for __int128 is placed at an unaligned location...
Jakub Jelinek [Fri, 20 Dec 2019 17:43:23 +0000 (18:43 +0100)] 
backport: re PR target/92904 (varargs for __int128 is placed at an unaligned location and uses movdqa for the load)

Backported from mainline
2019-12-12  Jakub Jelinek  <jakub@redhat.com>

PR target/92904
* config/i386/i386.c (ix86_gimplify_va_arg): If need_intregs and
not need_temp, decrease alignment of the read because the GPR save
area only guarantees 8-byte alignment.

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

From-SVN: r279673

5 years agobackport: re PR fortran/92899 ([OpenMP] ICE in gfc_trans_omp_atomic, at fortran/trans...
Jakub Jelinek [Fri, 20 Dec 2019 17:42:22 +0000 (18:42 +0100)] 
backport: re PR fortran/92899 ([OpenMP] ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3769)

Backported from mainline
2019-12-11  Jakub Jelinek  <jakub@redhat.com>

PR fortran/92899
* trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
do look through conversion on expr2 if any.

* testsuite/libgomp.fortran/atomic1.f90: New test.

From-SVN: r279672

5 years agobackport: re PR target/92723 (ICE in expand_shift_1, at expmed.c:2635)
Jakub Jelinek [Fri, 20 Dec 2019 17:41:17 +0000 (18:41 +0100)] 
backport: re PR target/92723 (ICE in expand_shift_1, at expmed.c:2635)

Backported from mainline
2019-12-11  Jakub Jelinek  <jakub@redhat.com>

PR target/92723
* tree-vect-patterns.c (vect_recog_rotate_pattern): If dt is not
vect_internal_def, use oprnd1 as is, without trying to cast it.
Formatting fix.

* gcc.dg/vect/pr92723.c: New test.

From-SVN: r279671

5 years agobackport: PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
Jakub Jelinek [Fri, 20 Dec 2019 17:37:45 +0000 (18:37 +0100)] 
backport: PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:

Backported from mainline
2019-12-06  Jakub Jelinek  <jakub@redhat.com>

PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
* cp-tree.h (extend_ref_init_temps): Add a new argument with NULL
default arg.
* call.c (set_up_extended_ref_temp): Add COND_GUARD argument, pass it
down to extend_ref_init_temps.  Before pushing cleanup, if COND_GUARD
is non-NULL, create a bool temporary if needed, initialize to false
and guard the cleanup with the temporary being true.
(extend_ref_init_temps_1): Add COND_GUARD argument, pass it down
to recursive calls and set_up_extended_ref_temp.  Handle COND_EXPR.
(extend_ref_init_temps): Add COND_GUARD argument, pass it down to
recursive calls and to extend_ref_init_temps_1.

* g++.dg/cpp0x/temp-extend2.C: New test.

From-SVN: r279669

5 years agobackport: re PR fortran/92775 (Incorrect expression in DW_AT_byte_stride on an array)
Jakub Jelinek [Fri, 20 Dec 2019 17:36:48 +0000 (18:36 +0100)] 
backport: re PR fortran/92775 (Incorrect expression in DW_AT_byte_stride on an array)

Backported from mainline
2019-12-06  Jakub Jelinek  <jakub@redhat.com>

PR fortran/92775
* trans.h (struct lang_type, struct lang_decl): Remove span member.
(GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
* trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
argument.
* trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
argument and initialize *SPAN_OFF to the offset of span field.
* trans-types.c (gfc_get_array_descr_info): Adjust
gfc_get_descriptor_offsets_for_info caller.  Compute elem_size
as base->span instead of TYPE_SIZE_UNIT (etype) constant.

From-SVN: r279668

5 years agobackport: re PR fortran/92781 (ICE in convert_nonlocal_reference_op, at tree-nested...
Jakub Jelinek [Fri, 20 Dec 2019 17:36:08 +0000 (18:36 +0100)] 
backport: re PR fortran/92781 (ICE in convert_nonlocal_reference_op, at tree-nested.c:1065)

Backported from mainline
2019-12-05  Jakub Jelinek  <jakub@redhat.com>

PR fortran/92781
* trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
current_function_decl, add length to current rather than parent
function and expect DECL_CONTEXT (length) to be current_function_decl.

* gfortran.dg/pr92781.f90: New test.

From-SVN: r279667

5 years agore PR fortran/92756 (ICE in lower_omp, at omp-low.c:12988)
Jakub Jelinek [Fri, 20 Dec 2019 17:35:18 +0000 (18:35 +0100)] 
re PR fortran/92756 (ICE in lower_omp, at omp-low.c:12988)

PR fortran/92756
* omp-low.c (check_omp_nesting_restrictions): If lang_GNU_Fortran,
diagnose teams not closely nested inside of target.

Backported from mainline
2019-12-04  Jakub Jelinek  <jakub@redhat.com>

PR fortran/92756
* gfortran.dg/gomp/teams1.f90: New test.

From-SVN: r279666

5 years agobackport: re PR c++/92732 (Bit-field of scoped enumeration type cannot be initialized)
Jakub Jelinek [Fri, 20 Dec 2019 17:34:14 +0000 (18:34 +0100)] 
backport: re PR c++/92732 (Bit-field of scoped enumeration type cannot be initialized)

Backported from mainline
2019-12-03  Jakub Jelinek  <jakub@redhat.com>

PR c++/92732
* typeck2.c (digest_nsdmi_init): For bitfields, use
DECL_BIT_FIELD_TYPE instead of TREE_TYPE.

* g++.dg/cpp2a/bitfield3.C: Don't expect narrowing conversion
warnings.
* g++.dg/cpp2a/bitfield4.C: New test.

From-SVN: r279665

5 years agobackport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from...
Jakub Jelinek [Fri, 20 Dec 2019 17:33:13 +0000 (18:33 +0100)] 
backport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)

Backported from mainline
2019-12-03  Jakub Jelinek  <jakub@redhat.com>

PR c++/92695
* constexpr.c (cxx_bind_parameters_in_call): For virtual calls,
adjust the first argument to point to the derived object rather
than its base.

* g++.dg/cpp2a/constexpr-virtual14.C: New test.

From-SVN: r279664

5 years agobackport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from...
Jakub Jelinek [Fri, 20 Dec 2019 17:32:23 +0000 (18:32 +0100)] 
backport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)

Backported from mainline
2019-12-02  Jakub Jelinek  <jakub@redhat.com>

PR c++/92695
* constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Use
STRIP_NOPS before checking for ADDR_EXPR.

* g++.dg/cpp2a/constexpr-virtual15.C: New test.

From-SVN: r279663

5 years agobackport: re PR c++/60228 (ICE using lambda in #pragma omp declare reduction)
Jakub Jelinek [Fri, 20 Dec 2019 17:30:38 +0000 (18:30 +0100)] 
backport: re PR c++/60228 (ICE using lambda in #pragma omp declare reduction)

Backported from mainline
2019-11-29  Jakub Jelinek  <jakub@redhat.com>

PR c++/60228
* parser.c (cp_parser_omp_declare_reduction_exprs): If
processing_template_decl, wrap the combiner or initializer
into EXPR_STMT.
* decl.c (start_preparsed_function): Don't start a lambda scope
for DECL_OMP_DECLARE_REDUCTION_P functions.
(finish_function): Don't finish a lambda scope for
DECL_OMP_DECLARE_REDUCTION_P functions, nor cp_fold_function
them nor cp_genericize them.
* mangle.c (decl_mangling_context): Look through
DECL_OMP_DECLARE_REDUCTION_P functions.
* semantics.c (expand_or_defer_fn_1): For DECL_OMP_DECLARE_REDUCTION_P
functions, use tentative linkage, don't keep their bodies with
-fkeep-inline-functions and return false at the end.

* g++.dg/gomp/openmp-simd-2.C: Don't expect bodies for
DECL_OMP_DECLARE_REDUCTION_P functions.

* testsuite/libgomp.c++/udr-20.C: New test.
* testsuite/libgomp.c++/udr-21.C: New test.

From-SVN: r279662

5 years agobackport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from...
Jakub Jelinek [Fri, 20 Dec 2019 17:26:28 +0000 (18:26 +0100)] 
backport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)

Backported from mainline
2019-11-28  Jakub Jelinek  <jakub@redhat.com>

PR c++/92695
* decl2.c (mark_used): Don't call note_vague_linkage_fn for pure
virtual functions, even if they are declared inline.

* g++.dg/warn/inline3.C: New test.

From-SVN: r279661

5 years agobackport: re PR fortran/91944 (ICE in gfc_conv_array_initializer, at fortran/trans...
Jakub Jelinek [Fri, 20 Dec 2019 17:25:39 +0000 (18:25 +0100)] 
backport: re PR fortran/91944 (ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6156)

Backported from mainline
2019-11-27  Jakub Jelinek  <jakub@redhat.com>

PR fortran/91944
* simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.

* gfortran.dg/spread_size_limit_2.f90: New test.

From-SVN: r279660