Commit Graph

169106 Commits

Author SHA1 Message Date
GCC Administrator
6da4411d95 Daily bump. 2020-01-31 00:18:49 +00:00
John David Anglin
6957d3e4ee Fix ICE in pa_elf_select_rtx_section.
2020-01-30  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.c (pa_elf_select_rtx_section): Place function pointers
	without a DECL in .data.rel.ro.local.
2020-01-30 07:29:35 -05:00
Kito Cheng
afb84a42ad RISC-V: Disallow regrenme if the TO register never used before for interrupt functions
gcc/ChangeLog

	PR target/93304
	* config/riscv/riscv-protos.h (riscv_hard_regno_rename_ok): New.
	* config/riscv/riscv.c (riscv_hard_regno_rename_ok): New.
	* config/riscv/riscv.h (HARD_REGNO_RENAME_OK): Defined.

gcc/testsuite/ChangeLog

	PR target/93304
	* gcc.target/riscv/pr93304.c: New test.
2020-01-30 15:33:07 +08:00
Jason Merrill
9d9679132e c++: Drop alignas restriction for stack variables.
Since expand_stack_vars and such know how to deal with variables aligned
beyond MAX_SUPPORTED_STACK_ALIGNMENT, we shouldn't reject alignas of large
alignments.  And if we don't do that, there's no point in having
check_cxx_fundamental_alignment_constraints at all, since
check_user_alignment already enforces MAX_OFILE_ALIGNMENT.

	PR c++/89357
	* c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2020-01-29 20:11:30 -05:00
GCC Administrator
c6613dd33c Daily bump. 2020-01-30 00:18:31 +00:00
Szabolcs Nagy
a1f8dca201 [AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI
This is a workaround that emits a BTI after the function label if that
is followed by a patch area. We try to remove the BTI that follows the
patch area (this may fail e.g. if the first instruction is a PACIASP).

So before this commit -fpatchable-function-entry=3,1 with bti generates

    .section __patchable_function_entries
    .8byte .LPFE
    .text
  .LPFE:
    nop
  foo:
    nop
    nop
    bti c // or paciasp
    ...

and after this commit

    .section __patchable_function_entries
    .8byte .LPFE
    .text
  .LPFE:
    nop
  foo:
    bti c
    nop
    nop
    // may be paciasp
    ...

and with -fpatchable-function-entry=1 (M=0) the code now is

  foo:
    bti c
    .section __patchable_function_entries
    .8byte .LPFE
    .text
  .LPFE:
    nop
    // may be paciasp
    ...

There is a new bti insn in the middle of the patchable area users need
to be aware of unless M=0 (patch area is after the new bti) or M=N
(patch area is before the label, no new bti). Note: bti is not added to
all functions consistently (it can be turned off per function using a
target attribute or the compiler may detect that the function is never
called indirectly), so if bti is inserted in the middle of a patch area
then user code needs to deal with detecting it.

Tested on aarch64-none-linux-gnu.

gcc/ChangeLog:

	PR target/92424
	* config/aarch64/aarch64.c (aarch64_declare_function_name): Set
	cfun->machine->label_is_assembled.
	(aarch64_print_patchable_function_entry): New.
	(TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY): Define.
	* config/aarch64/aarch64.h (struct machine_function): New field,
	label_is_assembled.

gcc/testsuite/ChangeLog:

	PR target/92424
	* gcc.target/aarch64/pr92424-2.c: New test.
	* gcc.target/aarch64/pr92424-3.c: New test.
2020-01-29 14:31:50 +00:00
GCC Administrator
50a42922d3 Daily bump. 2020-01-29 00:18:34 +00:00
Jason Merrill
1c7061c7c3 c++: Allow template rvalue-ref conv to bind to lvalue ref.
When I implemented the [over.match.ref] rule that a reference conversion
function needs to match l/rvalue of the target reference type it changed our
handling of this testcase.  It seems to me that our current behavior is what
the standard says, but it doesn't seem desirable, and all the other
compilers have our old behavior.  So let's limit the change to non-templates
until there's some clarification from the committee.

	PR c++/90546
	* call.c (build_user_type_conversion_1): Allow a template conversion
	returning an rvalue reference to bind directly to an lvalue.
2020-01-28 14:56:01 -05:00
Jason Merrill
9d4d55a52d c++: Function declared with typedef with eh-specification.
We just need to handle the exception specification like other properties of
a function typedef.

	PR c++/90731
	* decl.c (grokdeclarator): Propagate eh spec from typedef.
2020-01-28 09:53:16 -05:00
Jason Merrill
dcb23017b1 c++: Fix array of char typedef in template (PR90966).
Since Martin Sebor's patch for PR 71625 to change braced array initializers
to STRING_CST in some cases, we need to be ready for STRING_CST with types
that are changed by tsubst.  fold_convert doesn't know how to deal with
STRING_CST, which is reasonable; we really shouldn't expect it to here.  So
let's handle STRING_CST separately.

	PR c++/90966
	* pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert.
2020-01-28 09:53:07 -05:00
Jason Merrill
7db777843c c++: Fix ICE with lambda in member operator (PR93279)
Here the problem was that we were remembering the lookup in template scope,
and then trying to reuse that lookup in the instantiation without
substituting into it at all.  The simplest solution is to not try to
remember a lookup that finds a class-scope declaration, as in that case
doing the normal lookup again at instantiation time will always find the
right declarations.

	PR c++/93279 - ICE with lambda in member operator.
	* name-lookup.c (maybe_save_operator_binding): Don't remember
	class-scope bindings.
2020-01-28 09:52:57 -05:00
GCC Administrator
83f65674e7 Daily bump. 2020-01-28 00:18:29 +00:00
Nathan Sidwell
2ceb5aba64 c++: Bogus error using namespace alias [PR91826]
My changes to is_nested_namespace broke is_ancestor's use where a namespace
alias might be passed in.  This changes is_ancestor to look through the alias.

	PR c++/91826
	* name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias.
2020-01-27 07:41:26 -08:00
Wilco Dijkstra
a708cb25d9 [AArch64] Fix shrinkwrapping interactions with atomics (PR92692)
The separate shrinkwrapping pass may insert stores in the middle
of atomics loops which can cause issues on some implementations.
Avoid this by delaying splitting atomics patterns until after
prolog/epilog generation.

gcc/
	PR target/92692
	* config/aarch64/aarch64.c (aarch64_split_compare_and_swap)
	Add assert to ensure prolog has been emitted.
	(aarch64_split_atomic_op): Likewise.
	* config/aarch64/atomics.md (aarch64_compare_and_swap<mode>)
	Use epilogue_completed rather than reload_completed.
	(aarch64_atomic_exchange<mode>): Likewise.
	(aarch64_atomic_<atomic_optab><mode>): Likewise.
	(atomic_nand<mode>): Likewise.
	(aarch64_atomic_fetch_<atomic_optab><mode>): Likewise.
	(atomic_fetch_nand<mode>): Likewise.
	(aarch64_atomic_<atomic_optab>_fetch<mode>): Likewise.
	(atomic_nand_fetch<mode>): Likewise.

(cherry picked from commit e5e07b6818)
2020-01-27 12:58:02 +00:00
GCC Administrator
568968edb0 Daily bump. 2020-01-27 00:18:48 +00:00
Rainer Orth
bf15829bf6 testsuite: xfail gcc.target/i386/pr91298-?.c on Solaris/x86 with as
The new gcc.target/i386/pr91298-?.c testcases FAIL on Solaris/x86 with the
native assembler:

FAIL: gcc.target/i386/pr91298-1.c (test for excess errors)

Excess errors:
Assembler: pr91298-1.c
        "/var/tmp//ccE6r3xb.s", line 5 : Syntax error
        Near line: "    .globl  $quux"
        "/var/tmp//ccE6r3xb.s", line 6 : Syntax error
        Near line: "    .type   $quux, @function"
        "/var/tmp//ccE6r3xb.s", line 7 : Syntax error
        Near line: "$quux:"
        "/var/tmp//ccE6r3xb.s", line 15 : Syntax error
        Near line: "    .size   $quux, .-$quux"
        "/var/tmp//ccE6r3xb.s", line 24 : Syntax error
        Near line: "    movl    $($a), %eax"
        "/var/tmp//ccE6r3xb.s", line 38 : Syntax error
        Near line: "    leal    ($a)(,%eax,4), %eax"
        "/var/tmp//ccE6r3xb.s", line 51 : Syntax error
        Near line: "    movl    ($a), %eax"
        "/var/tmp//ccE6r3xb.s", line 63 : Syntax error
        Near line: "    movl    ($a)+16, %eax"
        "/var/tmp//ccE6r3xb.s", line 97 : Syntax error
        Near line: "    movl    $($quux), %eax"
        "/var/tmp//ccE6r3xb.s", line 101 : Syntax error
        Near line: "    .globl  $a"
        "/var/tmp//ccE6r3xb.s", line 104 : Syntax error
        Near line: "    .type   $a, @object"
        "/var/tmp//ccE6r3xb.s", line 105 : Syntax error
        Near line: "    .size   $a, 72"
        "/var/tmp//ccE6r3xb.s", line 106 : Syntax error
        Near line: "$a:"
        "/var/tmp//ccE6r3xb.s", line 228 : Syntax error
        Near line: "    .long   ($a)"

FAIL: gcc.target/i386/pr91298-2.c (test for excess errors)

It only allows letters, digits, '_' and '.' in identifiers:
https://docs.oracle.com/cd/E37838_01/html/E61064/eqbsx.html#XALRMeoqjw

For lack of an effective-target keyword matching -fdollars-in-identifiers,
this patch fixes this by xfailing them on *-*-solaris2.* && !gas.

Tested on i386-pc-solaris2.11 with as and gas and x86_64-pc-linux-gnu.

	* gcc.target/i386/pr91298-1.c: xfail on Solaris/x86 with native
	assembler.
	* gcc.target/i386/pr91298-2.c: Likewise.
2020-01-26 21:39:07 +01:00
GCC Administrator
393df7be49 Daily bump. 2020-01-26 00:18:21 +00:00
GCC Administrator
7058d1744c Daily bump. 2020-01-25 00:18:24 +00:00
Jason Merrill
a4b7cf5865 c++: Unshare expressions from constexpr cache.
Another place we need to unshare cached expressions.

	PR c++/92852 - ICE with generic lambda and reference var.
	* constexpr.c (maybe_constant_value): Likewise.
2020-01-24 14:08:32 -05:00
Jonathan Wakely
e2bcf65fee libstdc++: Simplify makefile rule for largefile-config.h (PR91947)
The previous rule could leave an incomplete file if the build was
interrupted, which would then not be remade if make was run again.

This makes the rule more robust by writing to a temporary file and only
moving it into place as the final step. It also simplifies the rule so
that only the essential macro definitions are written to the file, not
the explanatory comments and commented out #undef lines.

Also, the macro for enabling LFS on Mac OS X 10.5 is now set
unconditionally, which is a bug fix from upstream autoconf.

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

	PR libstdc++/91947
	* include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
	rule.
	* include/Makefile.in: Regenerate.
2020-01-24 11:18:43 +00:00
Jonathan Wakely
461c01b2d9 libstdc++: Fix recent documentation changes
Backport from mainline
2020-01-20  Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/faq.xml: Fix grammar.
	* doc/xml/manual/appendix_contributing.xml: Improve instructions.
	* doc/xml/manual/spine.xml: Update copyright years.
	* doc/html/*: Regenerate.
2020-01-24 11:18:29 +00:00
GCC Administrator
5fbc175234 Daily bump. 2020-01-24 00:18:13 +00:00
GCC Administrator
6dd69b7867 Daily bump. 2020-01-23 00:18:53 +00:00
Jakub Jelinek
f4a36c5017 Cherry-pick 15 bugfixes from mainline
r10-6140-gd80f0a8dc9c2e5886bb79bddee2674e1d3f9d105
r10-6137-gc892d8f58f6fed46c343bdb6dd4d365f08f801b8
r10-6136-g44a9d801a7080d39658754ad603536da6cff2cd0
r10-6135-ga38979d9d7a4ab08336436052704028c56187618
r10-6118-gbd0a3e244d94ad4a5e41f01ebf285f0861cb4a03
r10-6104-g51e010b5f75c1fff06425a72702c1bf82a3ab053
r10-6041-gc60a18f8056facdcf370ce0e5f51550c9df5b539
r10-5954-gfbbc4c24fd7ba87e0c47cd965ae624afba6fa375
r10-5897-g91df4397a1404df65de6de23426294c50ab88bd2
r10-5829-ga0ab54de0ec3e0d48b2a681f7f78fe14bc4099eb
r10-5723-g5a6e28b5bae7a236b35994d0f64fd902a574872c
r10-5712-g4ea5d54b3c7175de045589f994fc94ed7e59d80d
r10-5697-g2c8297996a7ab3496c5d2f798cdbe4cab749468e
r10-5650-g7cd268ad6a6f71877744539d17ed53e752774bfa
r10-5618-g6c7b84305a5e686644ee64bfd2d415f3f43fa85b
2020-01-22 20:18:03 +01:00
Jakub Jelinek
b6c7913402 aarch64: Fix aarch64_expand_subvti constant handling [PR93335]
The two patterns that call aarch64_expand_subvti ensure that {low,high}_in1
is a register, while {low,high}_in2 can be a register or immediate.
subdi3_compare1_imm uses the aarch64_plus_immediate predicate for its last
two operands (the value and negated value), but aarch64_expand_subvti calls
it whenever low_in2 is a CONST_INT, which leads to ICEs during vregs pass,
as the emitted insn is not recognized as valid subdi3_compare1_imm.
The following patch fixes that by only using subdi3_compare1_imm if it is ok
to do so, and otherwise force the constant into register and use the
non-immediate version - subdi3_compare1.
Furthermore, previously the code was calling force_reg on high_in2 only if
low_in2 is CONST_INT, on the (reasonable) assumption is that only if low_in2
is a CONST_INT, high_in2 can be non-REG, but with the above changes even in
the else we might have CONST_INT and force_reg doesn't do anything if the
operand is already a REG, so this patch calls it unconditionally.

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

	PR target/93335
	* config/aarch64/aarch64.c (aarch64_expand_subvti): Only use
	gen_subdi3_compare1_imm if low_in2 satisfies aarch64_plus_immediate
	predicate, not whenever it is CONST_INT.  Otherwise, force_reg it.
	Call force_reg on high_in2 unconditionally.

	* gcc.c-torture/compile/pr93335.c: New test.
2020-01-22 20:12:58 +01:00
Jakub Jelinek
d1c29dc8a3 i386: Fix up -fdollars-in-identifiers with identifiers starting with $ in -masm=att [PR91298]
In AT&T syntax leading $ is special, so if we have identifiers that start
with dollar, we usually fail to assemble it (or assemble incorrectly).
As mentioned in the PR, what works is wrapping the identifiers inside of
parens, like:
	movl	$($a), %eax
	leaq	($a)(,%rdi,4), %rax
	movl	($a)(%rip), %eax
	movl	($a)+16(%rip), %eax
	.globl	$a
	.type	$a, @object
	.size	$a, 72
$a:
	.string	"$a"
	.quad	($a)
(this is x86_64 -fno-pic -O2).  In some places ($a) is not accepted,
like as .globl operand, in .type, .size, so the patch overrides
ASM_OUTPUT_SYMBOL_REF rather than e.g. ASM_OUTPUT_LABELREF.
I didn't want to duplicate what assemble_name is doing (following
transparent aliases), so split assemble_name into two parts; just
mere looking at the first character of a name before calling assemble_name
wouldn't be good enough, a transparent alias could lead from a name
not starting with $ to one starting with it and vice versa.

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

	PR target/91298
	* output.h (assemble_name_resolve): Declare.
	* varasm.c (assemble_name_resolve): New function.
	(assemble_name): Use it.
	* config/i386/i386.h (ASM_OUTPUT_SYMBOL_REF): Define.

	* gcc.target/i386/pr91298-1.c: New test.
	* gcc.target/i386/pr91298-2.c: New test.
2020-01-22 20:12:57 +01:00
Jakub Jelinek
18cfaa4217 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.
2020-01-22 20:12:57 +01:00
Jakub Jelinek
39d602ba46 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.
2020-01-22 20:12:57 +01:00
Jakub Jelinek
51faa475c9 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.
2020-01-22 20:12:57 +01:00
Jakub Jelinek
1abe8d45b7 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.
2020-01-22 20:12:57 +01:00
Jakub Jelinek
514314b731 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.
2020-01-22 20:12:56 +01:00
Jakub Jelinek
a5ce64f7d5 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.
2020-01-22 20:12:56 +01:00
Jakub Jelinek
13e141515f 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.
2020-01-22 20:12:56 +01:00
Jakub Jelinek
5e94f77146 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.
2020-01-22 20:12:55 +01:00
Jakub Jelinek
75cdf66907 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.
2020-01-22 20:12:55 +01:00
Jakub Jelinek
7bf1518f84 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.
2020-01-22 20:12:55 +01:00
Jakub Jelinek
26e1a1c66f re PR libgomp/93065 (libgomp: destructor missing to delete goacc_cleanup_key)
PR libgomp/93065
	* oacc-init.c (goacc_runtime_deinitialize): New function.
2020-01-22 20:12:55 +01:00
Jakub Jelinek
dbc84c8b7f 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.
2020-01-22 20:12:54 +01:00
Jakub Jelinek
beee53d59e 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.
2020-01-22 20:12:54 +01:00
Joseph Myers
a11e92c4e7 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 ac68e287fc)
2020-01-22 17:26:10 +00:00
GCC Administrator
58735237fc Daily bump. 2020-01-22 00:18:31 +00:00
Jerry DeLisle
ae403e0d4e 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.
2020-01-21 15:35:42 -08:00
Jason Merrill
3384aa7af4 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.
2020-01-21 10:20:27 -05:00
GCC Administrator
00cae906a9 Daily bump. 2020-01-21 00:18:28 +00:00
Joseph Myers
9e9f9bf428 Update GCC zh_TW.po.
* zh_TW.po: Update.
2020-01-20 18:57:25 +00:00
Mark Eggleston
4206614946 [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.
2020-01-20 13:29:50 +00:00
Richard Biener
20e9d78543 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.
2020-01-20 12:57:04 +01:00
Martin Liska
ce91f0f189
Backport f48c601413
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.
2020-01-20 12:11:20 +01:00
Eric S. Raymond
fd5b5c275d 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.
2020-01-19 18:10:52 -08:00
GCC Administrator
cee5d51cef Daily bump. 2020-01-20 00:18:27 +00:00