Commit Graph

178513 Commits

Author SHA1 Message Date
H.J. Lu
c4c22e8302 LTO: Add -fcf-protection=check
Mixing -fcf-protection and -fcf-protection=none objects are allowed.
Linker just merges -fcf-protection values from all input objects.

Add -fcf-protection=check for the final link with LTO.  An error is
issued if LTO object files are compiled with different -fcf-protection
values.  Otherwise, -fcf-protection=check is ignored at the compile
time.  Without explicit -fcf-protection at link time, -fcf-protection
values from LTO object files are merged at the final link.

gcc/

	PR bootstrap/96203
	* common.opt: Add -fcf-protection=check.
	* flag-types.h (cf_protection_level): Add CF_CHECK.
	* lto-wrapper.c (merge_and_complain): Issue an error for
	mismatching -fcf-protection values with -fcf-protection=check.
	Otherwise, merge -fcf-protection values.
	* doc/invoke.texi: Document -fcf-protection=check.

gcc/testsuite/

	PR bootstrap/96203
	* gcc.target/i386/pr96203-1.c: New test.
	* gcc.target/i386/pr96203-2.c: Likewise.
2020-07-27 04:40:13 -07:00
Alexandre Oliva
fd5966e8e0 [Ada] Revert "Revamp dump and aux output names"
gcc/ada/

	* switch.adb (Is_Internal_GCC_Switch): Revert accidental
	reintroduction of auxbase and auxbase-strip.
2020-07-27 04:05:21 -04:00
Javier Miranda
abd4c42269 [Ada] Ada2020: AI12-0027 Access values and unaliased component
gcc/ada/

	* sem_res.adb (Resolve_Actuals): Restrict the check on matching
	aliased components to view conversions of array types that are
	not placed in an instance. In such case at runtime an object is
	created.
	* sem_util.ads (Is_Actual_In_Out_Parameter, Is_View_Conversion):
	New subprograms.
	* sem_util.adb (Is_Actual_In_Out_Parameter, Is_View_Conversion):
	New subprograms.
2020-07-27 04:05:21 -04:00
Arnaud Charlet
04c4a5101b [Ada] Assert failure on incorrect code
gcc/ada/

	* lib-xref.adb (Generate_Reference): Protect against malformed
	tree in case of severe errors.
	* sem_ch8.adb (Add_Implicit_Operator): Ditto.
2020-07-27 04:05:21 -04:00
Arnaud Charlet
cb030dd735 [Ada] Switch Ada_Version_Runtime to Ada 2020
gcc/ada/

	* opt.ads (Ada_Version_Runtime): Set to Ada_2020.
	* sem_ch3.adb (Analyze_Subtype_Declaration): Propagate
	Is_Independent flag to subtypes.
	* libgnarl/s-taprop__linux.adb: Adapt to Ada 2020 warning.
	* libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads,
	libgnat/a-nbnbin__gmp.adb, libgnat/a-nbnbre.adb,
	libgnat/a-nbnbre.ads, libgnat/a-stobbu.adb,
	libgnat/a-stobbu.ads, libgnat/a-stobfi.adb,
	libgnat/a-stobfi.ads, libgnat/a-stoubu.adb,
	libgnat/a-stoubu.ads, libgnat/a-stoufi.adb,
	libgnat/a-stoufi.ads, libgnat/a-stoufo.adb,
	libgnat/a-stoufo.ads, libgnat/a-stouut.adb,
	libgnat/a-stouut.ads, libgnat/a-strsto.ads,
	libgnat/a-ststbo.adb, libgnat/a-ststbo.ads,
	libgnat/a-ststun.adb, libgnat/a-ststun.ads,
	libgnat/a-stteou.ads, libgnat/s-aoinar.ads,
	libgnat/s-aomoar.ads, libgnat/s-atopex.ads,
	libgnat/s-putaim.adb, libgnat/s-putaim.ads,
	libgnat/s-putima.adb, libgnat/s-putima.ads: Remove pragma
	Ada_2020, now redundant.
2020-07-27 04:05:20 -04:00
Justin Squirek
19796dddf0 [Ada] Wrong accessibility on 'Access of formal in call
gcc/ada/

	* exp_ch6.adb (Expand_Call_Helper): Modify addition of the extra
	accessibility parameter to take into account the extra
	accessibility of formals within the calling subprogram.
2020-07-27 04:05:20 -04:00
Bob Duff
116e8b669e [Ada] Bug in Enum_Subtype'Image in Ada 2020 mode
gcc/ada/

	* exp_imgv.adb (Expand_Image_Attribute): Add Root_Type, so
	constrained subtypes work.
2020-07-27 04:05:20 -04:00
Ghjuvan Lacambre
f35bd40944 [Ada] Refactor pragma argument getters
gcc/ada/

	* exp_prag.adb (Arg1, Arg2, Arg3): Removed.
	(Arg_N): New function.
2020-07-27 04:05:20 -04:00
Arnaud Charlet
6c1bfc9e60 [Ada] AI12-0383 Renaming values
gcc/ada/

	* sem_ch8.adb (Analyze_Object_Renaming): Allow values in Ada
	2020 mode.
2020-07-27 04:05:19 -04:00
Arnaud Charlet
7b6fbc9ff3 [Ada] AI12-0377 View conversions and out parameters revisited
gcc/ada/

	* sem_res.adb (Resolve_Actuals): Refine 6.4.1 rules as per
	AI12-0377.
2020-07-27 04:05:19 -04:00
Bob Duff
2d4fe20359 [Ada] Ada2020: wording of 'Image messages
gcc/ada/

	* errout.ads, errout.adb (Error_Msg_Ada_2020_Feature): New
	procedure analogous to Error_Msg_Ada_2012_Feature.
	* sem_attr.adb (Analyze_Image_Attribute): Use
	Error_Msg_Ada_2012_Feature and Error_Msg_Ada_2020_Feature to
	indicate that Object'Image is allowed in Ada 2012, and that
	'Image is allowed for any type in Ada 2020.
2020-07-27 04:05:19 -04:00
Dmitriy Anisimkov
21717db17a [Ada] Unbounded string overriding control
gcc/ada/

	* libgnat/a-strunb.adb (Sum, Mul, Saturated_Sum, Saturated_Mul):
	New routines.  Use them when resulting string size more that
	length of the strings in parameters.
	(Unbounded_Slice): Use "- 1" instead of "+ 1" in opposite side
	of condition to avoid overflow.
	* libgnat/a-strunb__shared.adb (Sum, Mul): New routines.
	(Allocate): New routine with 2 parameters.  Use routine above
	when resulting string size more that length of the strings in
	parameters.
	(Aligned_Max_Length): Do not try to align to more than Natural'Last.
	(Unbounded_Slice): Use "- 1" instead of "+ 1" in opposite side
	of condition to avoid overflow.
2020-07-27 04:05:19 -04:00
Arnaud Charlet
7f365be815 [Ada] Remove disabled code
gcc/ada/

	* sem_attr.adb (Resolve_Attribute): Remove dead code.
2020-07-27 04:05:18 -04:00
Arnaud Charlet
4a08c95cf0 [Ada] Use membership tests in front-end
gcc/ada/

	* aspects.adb, atree.adb, atree.ads, checks.adb, contracts.adb,
	einfo.adb, errout.adb, exp_aggr.adb, exp_attr.adb, exp_cg.adb,
	exp_ch11.adb, exp_ch2.adb, exp_ch3.adb, exp_ch4.adb,
	exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_ch8.adb, exp_ch9.adb,
	exp_dbug.adb, exp_disp.adb, exp_intr.adb, exp_pakd.adb,
	exp_prag.adb, exp_put_image.adb, exp_smem.adb, exp_tss.adb,
	exp_unst.adb, exp_util.adb, freeze.adb, ghost.adb, gnat1drv.adb,
	inline.adb, lib-writ.adb, lib-xref-spark_specific.adb,
	lib-xref.adb, namet.adb, namet.ads, nlists.adb, par-ch10.adb,
	par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb,
	par-prag.adb, par-util.adb, par_sco.adb, pprint.adb,
	repinfo.adb, restrict.adb, rtsfind.adb, scil_ll.adb, sem.adb,
	sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb,
	sem_ch10.adb, sem_ch11.adb, sem_ch12.adb, sem_ch13.adb,
	sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch7.adb,
	sem_ch8.adb, sem_ch9.adb, sem_dim.adb, sem_disp.adb,
	sem_dist.adb, sem_elab.adb, sem_elim.adb, sem_eval.adb,
	sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb,
	sem_scil.adb, sem_type.adb, sem_util.adb, sem_warn.adb,
	sinfo.adb, sinfo.ads, sprint.adb, styleg.adb, tbuild.adb,
	treepr.adb (Nkind_In, Nam_In, Ekind_In): Removed, replaced by
	membership tests.
2020-07-27 04:05:18 -04:00
Gary Dismukes
26ac7446f6 [Ada] AI12-0194: Language-defined aspects and entry bodies
gcc/ada/

	* sem_prag.adb (Analyze_Pragma, Pragma_Max_Entry_Queue_Length):
	Refine error message to indicate that the pragma must apply to
	an entry declaration, not just an entry.
2020-07-27 04:05:17 -04:00
Javier Miranda
84ae33e7f5 [Ada] Spurious error in generic dispatching constructor
gcc/ada/

	* exp_ch6.adb (Make_Build_In_Place_Iface_Call_In_Allocator):
	Revert previous patch, and add a missing type conversion to
	displace the pointer to the allocated object to reference the
	target dispatch table.
2020-07-27 04:05:17 -04:00
Javier Miranda
36f0cf4e60 [Ada] Ada2020: AI12-0027 Access values and unaliased component
gcc/ada/

	* sem_res.adb (Resolve_Actuals): Restore restrictive check on
	view conversions which required matching value of
	Has_Aliased_Components of formals and actuals. Required to avoid
	the regression of ACATS b460005.
2020-07-27 04:05:17 -04:00
Eric Botcazou
2c3bc159a8 [Ada] Remove obsolete special case in Switch_View
gcc/ada/

	* sem_ch12.adb (Instantiate_Package_Body): Add commentary for a
	nesting issue with parent handling and private view switching.
	(Switch_View): Do not skip specific private-dependent subtypes.
2020-07-27 04:05:17 -04:00
Patrick Bernardi
c893f4a5e0 [Ada] x86-lynx178elf: use a-numaux.ads instead of a-numaux__libc-x86.ads
gcc/ada/

	* Makefile.rtl: Remove X86_TARGET_PAIRS for x86-lynx178elf.
2020-07-27 04:05:16 -04:00
Ed Schonberg
79926e5a90 [Ada] Warnings on overloays involving generic In_Parameters
gcc/ada/

	* sem_ch13.adb (Analyze_Address_Specification_Clause): Do not
	emit a warning when a constant declaration in a generic unit
	overlays a generic In_Parameter.
2020-07-27 04:05:16 -04:00
Gary Dismukes
faa163f737 [Ada] AI12-0382: Loosen type-invariant overriding requirement of AI12-0042
gcc/ada/

	* sem_ch3.adb (Check_Abstract_Overriding): Remove Scope
	comparison test from test related to initial implementation of
	AI12-0042, plus remove the related ??? comment.
	(Derive_Subprogram): Add test requiring that the type extension
	appear in the visible part of its enclosing package when
	checking the overriding requirement of 7.3.2(6.1/4), as
	clarified by AI12-0382.
2020-07-27 04:05:16 -04:00
Piotr Trojanek
df81923f6d [Ada] Add range check for GNATprove on 'Pos to Long_Integer conversion
gcc/ada/

	* exp_spark.adb (Expand_SPARK_N_Attribute_Reference) Extend
	existing workaround to 'Pos.
2020-07-27 04:05:15 -04:00
Bob Duff
1e29b5465e [Ada] Ada2020: AI12-0304 Put_Image attrs of lang-def types
gcc/ada/

	* libgnat/s-rannum.ads, libgnat/s-rannum.adb: Add Put_Image.
	This will be inherited by the language-defined packages
	Ada.Numerics.Discrete_Random and Ada.Numerics.Float_Random.
	* libgnat/a-convec.ads, libgnat/a-convec.adb: Add Put_Image.
	* libgnat/s-putima.ads: Add pragma Preelaborate, so this can be
	imported into containers packages.
	* libgnat/s-putima.adb: Move Digit to private part; otherwise
	reference to Base is illegal in Preelaborate generic.
	* exp_put_image.adb (Build_Record_Put_Image_Procedure): Use the
	base type.
2020-07-27 04:05:15 -04:00
Martin Liska
7f5c0f328e
Use vec::reserve before vec_safe_grow_cleared is called
gcc/ChangeLog:

	PR lto/45375
	* symbol-summary.h: Call vec_safe_reserve before grow is called
	in order to grow to a reasonable size.
	* vec.h (vec_safe_reserve): Add missing function for vl_ptr
	type.
2020-07-27 09:16:16 +02:00
Tobias Burnus
20d0d6527c fortran/openmp.c - silence static analyzer warning
gcc/fortran/ChangeLog:

	* openmp.c (gfc_resolve_omp_directive): Remove NULL check
	for clauses in EXEC_OMP_CRITICAL as it no longer can be NULL.
2020-07-27 09:12:15 +02:00
Hans-Peter Nilsson
f377228335 gcc.dg/tree-ssa/vector-4.c: Adjust for mmix.
Again, the variables are "privatized" using ASM_PN_FORMAT for MMIX (but
apparently not for other targets) and the line to match looks like:
  D.1427 = VEC_PERM_EXPR <a::0, b::1, { 0, 4, 1, 5 }>;

gcc/testsuite:
	* gcc.dg/tree-ssa/vector-4.c: Adjust for mmix.
2020-07-27 03:39:16 +02:00
Hans-Peter Nilsson
642dc9a058 gcc.dg/tree-ssa/ssa-dse-26.c: Adjust for mmix.
The variables are "localized" using ASM_PN_FORMAT for MMIX and the
lines to match look like:
  Deleted dead store: y::4 = y;
  Deleted dead store: x::3 = x;

gcc/testsuite:
	* gcc.dg/tree-ssa/ssa-dse-26.c: Adjust for mmix.
2020-07-27 03:11:46 +02:00
Hans-Peter Nilsson
092edb719c gcc.dg/tree-ssa/ssa-dom-cse-2.c: xfail scan for mmix.
Looking at the dump and the test, I guess all "64-bit targets" fail
the test for the reasons seen in the comment just above the dg-final,
whose last two lines make it to the patch context.  Maybe the xfail
target list can be shortened by removing most targets and use just
"lp64".  That doesn't cover it passing on x86_64 and s390x-zarch
though.

gcc/testsuite:
	* gcc.dg/tree-ssa/ssa-dom-cse-2.c: xfail scan for mmix.
2020-07-27 02:39:34 +02:00
GCC Administrator
049fbbdc60 Daily bump. 2020-07-27 00:16:20 +00:00
Hans-Peter Nilsson
5630c40fc7 gcc.dg/tree-ssa/reassoc-20.c: Adjust for mmix.
The expression of interest looks like "e_5 = a::0_1 + b::1_2;" for
mmix-knuth-mmixware, while other targets have a "." instead of the
"::".  ISTM the most useful change here is not to disable the test,
but to add an optional character in the matched expression to match
the "extra" ":".  Also checked cris-elf to assert that the expression
still passes for an "ordinary" ELF target.

gcc/testsuite:
	* gcc.dg/tree-ssa/reassoc-20.c: Adjust for mmix.
2020-07-27 02:09:58 +02:00
Hans-Peter Nilsson
39ddfef9a5 mmix: Don't turn off .hidden support.
In 2012 e2769e908a915ebbc/r192344, I added the following lines, that I
now delete.  I've changed my mind: ELF-related targets based on gas,
that support only static linking, have .hidden "for free", regardless
of the visibility of the hidden object in the linked executable.  No
regressions for mmix-knuth-mmixware and "fixes":

FAIL: gcc.dg/torture/pr94947-1.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
Excess errors:
lto1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]

...a warning which is emitted for "all" LTO tests (of which most have
warnings filtered out); LTO "thinks" all supported targets have
.hidden support.

gcc:
	* configure.ac (out-of-tree linker .hidden support): Don't turn off
	for mmix-knuth-mmixware.
	* configure: Regenerate.
2020-07-27 00:08:54 +02:00
Patrick Palka
798ff1c3e1 c++: Add testcase for [PR79504]
We successfully compile this testcase ever since r8-5270.

gcc/testsuite/ChangeLog:

	PR c++/79504
	* g++.dg/cpp0x/decltype79.C: New test.
2020-07-26 13:51:02 -04:00
Aaron Sawdey
e398fcb9ce rs6000: add option -mblock-ops-unaligned-vsx
This option is mostly being added to provide -mno-block-ops-unaligned-vsx.
The default is set the same as -mefficient-unaligned-vsx. This option will
control the use of unaligned VSX loads/stores in the inline expansion
of memcpy() and memmove(). The use case for this would be if you're
compiling code that is doing a memcpy to memory mapped device memory
that is cache-inhibited. On some powerpc processors this requires the
unaligned vsx ops to be emulated by the kernel which is very slow.

gcc/ChangeLog:

	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Set the default value for -mblock-ops-unaligned-vsx.
	* config/rs6000/rs6000.opt: Add -mblock-ops-unaligned-vsx.
	* doc/invoke.texi: Document -mblock-ops-unaligned-vsx.
2020-07-26 12:11:47 -05:00
Tobias Burnus
2e764ae1d6 libgfortran: Skip integer-kind=16 check for amdgcn
libgfortran/ChangeLog:

	PR target/96306
	* configure.ac: Add LIBGOMP_CHECKED_INT_KINDS and
	LIBGOMP_CHECKED_REAL_KINDS and use it for to skip
	integer kind=16 checks for amdgcn.
	* Makefile.am (kinds.h, selected_int_kind.inc,
	selected_real_kind.inc): Pass them on.
	* mk-kinds-h.sh: Takes to-be-check kinds as argument.
	* mk-sik-inc.sh: Likewise.
	* mk-srk-inc.sh: Likewise.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
2020-07-26 07:20:24 +02:00
Hans-Peter Nilsson
2ab2694476 gcc.dg/tree-ssa/forwprop-36.c: Adjust for mmix
The label of interest here is "b.0_2" for
e.g. x86_64-pc-linux-gnu but "b::1_2" for mmix-knuth-mmixware.
The test seems to be of some interest for mmix (hey, gcc
open-coded 128-bit integer support behind my back!) so I didn't
want to just disable it.  I also didn't want to obscure the
matching pattern by generalizing it, so instead I added a
separate matching pattern.

gcc/testsuite:
	* gcc.dg/tree-ssa/forwprop-36.c: Adjust for mmix.
2020-07-26 03:33:15 +02:00
Hans-Peter Nilsson
b5087b28b0 gcc.dg/torture/pr59330.c: Disable for mmix
With the dejagnu status-wrapper, there's a reference to write in
each executable, which for mmix in newlib has a reference to a
variable defined in open, which for mmix in newlib has a
reference to sprintf (oops!) and the dependency-chain goes on;
ad finitum there's a reference to malloc, which in default
newlib is colocated with free; the same file
newlib/libc/stdlib/malloc.c.

Not being compiled with -ffunction-sections, they're emitted in
the same section (.text) and thus inseparable: you can't
override just one of them as in this test, or else you'll get:

<X>/pre/mmix/bin/ld: <X>/gccobj/mmix/./newlib/libc.a(lib_a-malloc.o): in function `free':
<X>/gcc/newlib/libc/stdlib/malloc.c:169: multiple definition of `free'; /tmp/ccvRA0zb.o:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: gcc.dg/torture/pr59330.c   -O0  (test for excess errors)

I'm using a dg-skip-if here instead of starting a hardly
scalable dg-do target selector.  I'm not keying on
effective-target unwrapped because the dependency-chain is
target-specific rather than dejagnu status-wrapper-specific.

gcc/testsuite:
	* gcc.dg/torture/pr59330.c: Disable for mmix.
2020-07-26 02:44:02 +02:00
GCC Administrator
ae2e0bc19b Daily bump. 2020-07-26 00:16:21 +00:00
Hans-Peter Nilsson
8e807b59d8 config/mmix/mmix.c (TARGET_ASM_OUTPUT_IDENT): Override.
Funny that default_asm_output_ident_directive isn't the default...
Anyway, since dot-pseudos like .ident are treated as comments by
mmixal, there's nothing lost compatibilitywise by supporting it.
If mmix-knuth-mmixware had included elfos.h this'd have been the
default.  There might be enough reason to do that; relocatable objects
are ELF but (by default) links to produce mmo.  Fixes
c-c++-common/ident-1b.c and 2b in C and C++ testing.  Committed.

gcc:
	* config/mmix/mmix.c (TARGET_ASM_OUTPUT_IDENT): Override the default
	with default_asm_output_ident_directive.
2020-07-25 23:25:09 +02:00
Iain Sandoe
e0e546635a C++, testsuite: Adjust pure-virtual1.C options for Darwin.
Darwin's static linker expects, by default, that all linkage will
be satisfied (even for weak items).  This allows the two-level
namespace to work even for weak cases.

However, there's an option to make it behave in a similar manner
to ELF.  This is needed for the pure-virtual1.C testcase to pass
on Darwin.

gcc/testsuite/ChangeLog:

	* g++.dg/abi/pure-virtual1.C: Add dynamic_lookup option
	for Darwin.
2020-07-25 21:48:06 +01:00
Martin Sebor
e0633768a1 Fix PR c++/96310 - Ignoring -Wnonnull via pragma gcc diagnostics still produces an unwanted note.
gcc/c-family/ChangeLog:
	PR c++/96310
	* c-common.c (check_nonnull_arg): Print note only when warning was
	issued.
2020-07-25 14:24:24 -06:00
Andrew Stubbs
8d0b2b3374 amdgcn: Enable TImode
This enables types __int128 et al for move, add, subtract, and logical
operations.  At least shift, rotate, multiple, divide, and modulus are broken
so we can expect some test failures.

This is required now because libgomp no longer builds without __int128.

An additional patch will be required to unbreak the libgfortran build.

gcc/ChangeLog:

	* config/gcn/gcn.c (gcn_scalar_mode_supported_p): New function.
	(TARGET_SCALAR_MODE_SUPPORTED_P): New define.
2020-07-25 15:44:46 +01:00
GCC Administrator
53256ee3d5 Daily bump. 2020-07-25 00:16:22 +00:00
David Edelsohn
6643d2367f aix: Support GCC64 for AIX 7.1.
gcc/ChangeLog:

2020-07-24  David Edelsohn  <dje.gcc@gmail.com>
	    Clement Chigot  <clement.chigot@atos.net>

	* config.gcc (powerpc-ibm-aix7.1): Use t-aix64 and biarch64 for
	cpu_is_64bit.
	* config/rs6000/aix71.h (ASM_SPEC): Remove aix64 option.
	(ASM_SPEC32): New.
	(ASM_SPEC64): New.
	(ASM_CPU_SPEC): Remove vsx and altivec options.
	(CPP_SPEC_COMMON): Rename from CPP_SPEC.
	(CPP_SPEC32): New.
	(CPP_SPEC64): New.
	(CPLUSPLUS_CPP_SPEC): Rename to CPLUSPLUS_CPP_SPEC_COMMON..
	(TARGET_DEFAULT): Use 64 bit mask if BIARCH.
	(LIB_SPEC_COMMON): Rename from LIB_SPEC.
	(LIB_SPEC32): New.
	(LIB_SPEC64): New.
	(LINK_SPEC_COMMON): Rename from LINK_SPEC.
	(LINK_SPEC32): New.
	(LINK_SPEC64): New.
	(STARTFILE_SPEC): Add 64 bit version of crtcxa and crtdbase.
	(ASM_SPEC): Define 32 and 64 bit alternatives using DEFAULT_ARCH64_P.
	(CPP_SPEC): Same.
	(CPLUSPLUS_CPP_SPEC): Same.
	(LIB_SPEC): Same.
	(LINK_SPEC): Same.
	(SUBTARGET_EXTRA_SPECS): Add new 32/64 specs.
	* config/rs6000/aix72.h (TARGET_DEFAULT): Use 64 bit mask if BIARCH.
	* config/rs6000/defaultaix64.h: Delete.
2020-07-24 19:57:14 -04:00
Segher Boessenkool
4e57791005 rs6000: Remove -mpower10 option (PR95907)
The only way to enable or disable Power10 insns (ISA 3.1 insns) should
be via the -mcpu= switch.  This patch disables the -mpower10 options the
same way the -mdirect-move switch is neutered already.  That is not an
ideal way, but it works, it is not the first, and doing it properly is
more work, and will happen later.

2020-07-24  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.opt: Delete -mpower10.

gcc/testsuite/
	* gcc.target/powerpc/pr95907.c: New.
2020-07-24 23:23:07 +00:00
Hans-Peter Nilsson
f8f3a0102c c-c++-common/pr56493.c: Allow ":" in label, for mmix.
No dots in labels for MMIX: internal labels instead contain ":".

gcc/testsuite:

	* c-c++-common/pr56493.c: Allow ":" in label, for mmix.
2020-07-25 00:05:42 +02:00
Hans-Peter Nilsson
52cdac6823 testsuite: Adjust patchable_function tests for mmix.
There's no reason anyone would want to use the "patchable function"
feature for MMIX and also no reason to exclude those tests.  For MMIX,
the NOP equivalent is SWYM ("swymming" is a healthy exercise).
Text-wise, making the tests pass by adjusting the regexp, is shorter,
and it seems unlikely to both appear as a mnemonic for other targets
*and* being emitted in uppercase.

gcc/testsuite:

	* c-c++-common/patchable_function_entry-decl.c,
	c-c++-common/patchable_function_entry-default.c,
	c-c++-common/patchable_function_entry-definition.c: Adjust for mmix.
2020-07-24 23:50:05 +02:00
Sunil K Pandey
07c70c29af Add testcase to show kernel issue got fixed by pr95237 [PR96192]
This test case, extracted from PR 95645, was failing because alignment
of local long long variable got lowered from 8 bytes to 4 bytes in
adjust alignment pass, which triggered assert failure.

This test case passes now because PR 95237 fix only allows lowering of
alignment of local variables in the front end.  As a result, alignment
of local long long variable no longer gets lowered in adjust alignment
pass.

gcc/testsuite/ChangeLog:

	PR target/96192
	* c-c++-common/pr96192-1.c: New test.
2020-07-24 14:17:44 -07:00
Alexandre Oliva
49341f3bd4 add offload target to testname for pass/fail message
Offload tests that scan dump files may run multiple times, once per
offload target, but the test result messages do not mention the
offload target, so we may seem to have repeated results.  Fixed by
modifying the test name so that it contains the offload target name.


Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
for  gcc/testsuite/ChangeLog

	* lib/scanoffload.exp (scoff-testname, scoff-adjust): New.
	(scoff): Call them.
2020-07-24 16:13:53 -03:00
Alexandre Oliva
0e3ad7e4d0 revamp intelmic-mkoffload aux dump names
Rework intelmic-mkoffload into the new aux and dump file naming
semantics.  Obey -save-temps.


Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
for  gcc/ChangeLog

	* config/i386/intelmic-mkoffload.c
	(generate_target_descr_file): Use dumppfx for save_temps
	files.  Pass -dumpbase et al down to the compiler.
	(generate_target_offloadend_file): Likewise.
	(generate_host_descr_file): Likewise.
	(prepare_target_image): Likewise.  Move out_obj_filename
	setting...
	(main): ... here.  Detect -dumpbase, set dumppfx too.
2020-07-24 16:13:42 -03:00
Alexandre Oliva
c1b9cb1a83 [PR96230] some -dumpbase-ext fixes
The initial bug report was that compiling (-c) with -dumpbase ""
-dumpbase-ext .<ext> crashes the driver.

The verification of -dumpbase-ext against -dumpbase doesn't cover the
case in which -dumpbase activates backward-compatibility mode.

I added a test for that, and for -dumpbase-ext without -dumpbase,
trying to make it work in a sensible way, as if applied to the default
-dumpbase for each file.  It turned out that this made for too much
complexity in dealing with suffixes derived from input filenames, so I
gave that up and returned to discarding -dumpbase-ext as documented,
ending up with a change identical to that in the original bug report.

I also thought I caught an off-by-one error in the initial
verification, that caused dumpbase_ext to be discarded if it was
identical to the specified dumpbase, but that turned out to be
intentional as well, so I put in comments and a test to reflect it.

Finally, an earlier version of the newly-added tests used "$var.ext"
in an expected output list, which showed me the handling of string
expansion was incorrect.  Reworked the expr into an eval to make that
work, and, absent any reliance on post-eval adjustments to so-expanded
output names, I arranged for the adjustments to be skipped after eval.


Co-Authored-By: "Zhanghaijian (A)" <z.zhanghaijian@huawei.com>
for  gcc/ChangeLog

	PR driver/96230
	* gcc.c (process_command): Adjust and document conditions to
	reset dumpbase_ext.

for  gcc/testsuite/ChangeLog

	PR driver/96230
	* gcc.misc-tests/outputs.exp: Add tests with -dumpbase-ext,
	with identical -dumpbase, with -dumpbase "", and without any
	-dumpbase.
	(outest): Fix "" expansion in expected outputs, skip
	adjustments.
2020-07-24 16:13:39 -03:00