2019-05-20 Martin Liska <mliska@suse.cz>
* profile-count.h (enum profile_quality): Use capital letters
for enum value names. Use the adjusted names.
* profile-count.c: Use the adjusted names.
From-SVN: r271397
This replaces "wH" by "v", "wI" by "d", and when both are allowed it
uses "wa"; all with isa "p8v".
* config/rs6000/constraints.md (define_register_constraint "wH"):
Delete.
(define_register_constraint "wI"): Delete.
* config/rs6000/rs6000.h (enum r6000_reg_class_enum): Delete
RS6000_CONSTRAINT_wH and RS6000_CONSTRAINT_wI.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Adjust.
(rs6000_init_hard_regno_mode_ok): Adjust.
* config/rs6000/rs6000.md: Replace "wH" and "wI" constraints by "v"
resp. "d", or with "wa" as appropriate, all with "p8v".
* config/rs6000/vsx.md: Ditto.
* doc/md.texi (Machine Constraints): Adjust.
From-SVN: r271390
This replaces the "wy" constraint by "wa", with isa "p8v". It also
creates a new attribute <Fisa>, used together with all <Fv2>.
* config/rs6000/constraints.md (define_register_constraint "wy"):
Delete.
* config/rs6000/rs6000.h (enum r6000_reg_class_enum): Delete
RS6000_CONSTRAINT_wy.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Adjust.
(rs6000_init_hard_regno_mode_ok): Adjust.
* config/rs6000/rs6000.md: Replace "wy" constraint by "wa" with "p8v".
Use "<Fisa>" as "isa" in all alternatives that use "<Fv2>".
(define_mode_attr Fisa): New.
* config/rs6000/vsx.md: Replace "wy" constraint by "wa" with "p8v".
* doc/md.texi (Machine Constraints): Adjust.
From-SVN: r271389
This replaces the "wu" constraint by "v", with isa "p8v". Or, in most
cases, use "wa", since the instructions allow all VSX registers, and it
does not change how GCC behaves, so it is clearer that way.
This also delete the unused <Fa>.
* config/rs6000/constraints.md (define_register_constraint "wu"):
Delete.
* config/rs6000/rs6000.h (enum r6000_reg_class_enum): Delete
RS6000_CONSTRAINT_wu.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Adjust.
(rs6000_init_hard_regno_mode_ok): Adjust.
* config/rs6000/rs6000.md: Replace "wu" constraint by "v" or "wa",
both with "p8v".
(define_mode_attr Fa): Delete.
* config/rs6000/vsx.md: Ditto.
* doc/md.texi (Machine Constraints): Adjust.
From-SVN: r271388
When using posix_spawn or fork to launch a child process, the parent
needs to wait for the child, otherwise the dead child is left as a
zombie process. For this purpose one can install a signal handler for
SIGCHLD.
2019-05-19 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/90038
* intrinsics/execute_command_line (sigchld_handler): New function.
(execute_command_line): Install handler for SIGCHLD.
* configure.ac: Check for presence of sigaction and waitpid.
* config.h.in: Regenerated.
* configure: Regenerated.
Regtested on x86_64-pc-linux-gnu.
From-SVN: r271384
2019-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/90498
* trans-stmt.c (trans_associate_var) Do not use the saved
descriptor if the expression is a COMPONENT_REF.
2019-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/90498
* gfortran.dg/associate_48.f90 : New test.
From-SVN: r271380
2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88821
* expr.c (gfc_is_simply_contiguous): Return true for
an EXPR_ARRAY.
* trans-array.c (is_pointer): New function.
(gfc_conv_array_parameter): Call gfc_conv_subref_array_arg
when not optimizing and not optimizing for size if the formal
arg is passed by reference.
* trans-expr.c (gfc_conv_subref_array_arg): Add arguments
fsym, proc_name and sym. Add run-time warning for temporary
array creation. Wrap argument if passing on an optional
argument to an optional argument.
* trans.h (gfc_conv_subref_array_arg): Add optional arguments
fsym, proc_name and sym to prototype.
2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88821
* gfortran.dg/alloc_comp_auto_array_3.f90: Add -O0 to dg-options
to make sure the test for internal_pack is retained.
* gfortran.dg/assumed_type_2.f90: Split compile and run time
tests into this and
* gfortran.dg/assumed_type_2a.f90: New file.
* gfortran.dg/c_loc_test_22.f90: Likewise.
* gfortran.dg/contiguous_3.f90: Likewise.
* gfortran.dg/internal_pack_11.f90: Likewise.
* gfortran.dg/internal_pack_12.f90: Likewise.
* gfortran.dg/internal_pack_16.f90: Likewise.
* gfortran.dg/internal_pack_17.f90: Likewise.
* gfortran.dg/internal_pack_18.f90: Likewise.
* gfortran.dg/internal_pack_4.f90: Likewise.
* gfortran.dg/internal_pack_5.f90: Add -O0 to dg-options
to make sure the test for internal_pack is retained.
* gfortran.dg/internal_pack_6.f90: Split compile and run time
tests into this and
* gfortran.dg/internal_pack_6a.f90: New file.
* gfortran.dg/internal_pack_8.f90: Likewise.
* gfortran.dg/missing_optional_dummy_6: Split compile and run time
tests into this and
* gfortran.dg/missing_optional_dummy_6a.f90: New file.
* gfortran.dg/no_arg_check_2.f90: Split compile and run time tests
into this and
* gfortran.dg/no_arg_check_2a.f90: New file.
* gfortran.dg/typebound_assignment_5.f90: Split compile and run time
tests into this and
* gfortran.dg/typebound_assignment_5a.f90: New file.
* gfortran.dg/typebound_assignment_6.f90: Split compile and run time
tests into this and
* gfortran.dg/typebound_assignment_6a.f90: New file.
* gfortran.dg/internal_pack_19.f90: New file.
* gfortran.dg/internal_pack_20.f90: New file.
* gfortran.dg/internal_pack_21.f90: New file.
From-SVN: r271377
Darwin is able to use two runtimes for objective-c; the
default is its native "NeXT" runtime, but also it can build
code using the "gnu-runtime". In order to do this, we have to
be able to find the gnu-runtime headers (which are installed
into the compiler's tree).
The process to do this is erroneously prepending the sysroot
to this when a sysroot is in force. The gnu-runtime headers have
never been installed in a Darwin (macOS) SDK so we must make
sure that they are found local to the compiler.
gcc/
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin-c.c (darwin_register_objc_includes): Do not
prepend the sysroot when building gnu-runtime header search
paths.
From-SVN: r271371
The instancetype has been added as a typedef alias to id
in order to allow diagnosis of cases where a class is used
or returned where an instance is expected.
This adds the typedef, and tests that we can parse it.
It doesn't alter the diagnostics yet.
gcc/objc/
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* objc/objc-act.h (OCTI_INSTANCE_TYPE, OCTI_INSTANCETYPE_NAME): New.
(objc_global_trees): Add instance type and name.
(INSTANCE_TYPEDEF_NAME): New.
* objc/objc-act.c (synth_module_prologue): Build decls for
objc_instancetype_type and objc_instancetype_name.
gcc/testsuite/
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* objc.dg/instancetype-0.m: New.
From-SVN: r271370
We have been emitting two section swiches in the Darwin's
file end function. This means that varasm is not updated
which could matter if we elect to reorder some of the file
end operations in support of LTO actions.
2019-05-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_file_end): Use switch_to_section ()
instead of direct output of the asm.
From-SVN: r271369
PR libstdc++/90520
* python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
Raise exception if unique_ptr tuple member has unknown structure.
* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
Adjust worker to support new __uniq_ptr_data base class. Do not
assume field called _M_head_impl is the first tuple element.
From-SVN: r271363
This uses epilogue_type directly. It also changes some ints to bools,
declares variables later, and simplifies some code.
There is one actual change:
else if (info->push_p
&& DEFAULT_ABI != ABI_V4
- && !crtl->calls_eh_return)
+ && epilogue_type != EPILOGUE_TYPE_EH_RETURN)
{
/* Prevent reordering memory accesses against stack pointer restore. */
(different because calls_eh_return can be true for sibcalls). This is
a bugfix. The code was never exercised.
One place in the epilogue still uses crtl->calls_eh_return. If that
is changed the prologue has to have a corresponding change, and the
emit_prologue function does not have an epilogue_type parameter, so
bail on changing this for now. We might want to do this (saving the
CR fields to separate stack slots) always, not just for functions
calling eh_return, but that will require more investigation.
* config/rs6000/rs6000.c (restore_saved_cr): Change a boolean
argument to be type bool (was int before).
(rs6000_emit_epilogue): Simplify some code. Declare some variables
at first use. Use type bool for some variables. Fix a theoretical
eh_return bug for svr4.
From-SVN: r271361
This adds the "enabled" attribute to the rs6000 backend. It uses the
(new) "isa" attribute to automatically select which instruction
alternatives should be enabled.
For now it allows isa strings of "p5", "p6", "p7", meaning the
instructions introduced on that CPU, not requiring vectors; and "p7v",
"p8v", "p9v" for the same, but with vectors.
These are currently mapped to TARGET_POPCNTB, TARGET_CMPB,
TARGET_POPCNTD, TARGET_VSX, TARGET_P8_VECTOR, and TARGET_P9_VECTOR;
that will change to something a bit saner later.
* config/rs6000/rs6000.md (isa): New attribute.
(enabled): New attribute.
From-SVN: r271360
Change that moved assemble_start_function/assemble_end_function to
backends missed aarch64. Fix that.
gcc/
2019-05-17 Max Filippov <jcmvbkbc@gmail.com>
* config/aarch64/aarch64.c (aarch64_output_mi_thunk): Call
assemble_start_function and assemble_end_function.
From-SVN: r271359
gcc/
PR middle-end/89433
* omp-general.c (oacc_build_routine_dims): Move some of its
processing into...
(oacc_verify_routine_clauses): ... this new function.
* omp-general.h (oacc_verify_routine_clauses): New prototype.
gcc/c/
PR c/89433
* c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
(c_finish_oacc_routine): Call oacc_verify_routine_clauses.
gcc/cp/
PR c++/89433
* parser.c (cp_parser_oacc_routine)
(cp_parser_late_parsing_oacc_routine): Normalize order of clauses.
(cp_finalize_oacc_routine): Call oacc_verify_routine_clauses.
gcc/testsuite/
PR testsuite/89433
* c-c++-common/goacc/routine-2.c: Update, and move some test
into...
* c-c++-common/goacc/routine-level-of-parallelism-1.c: ... this
new file.
From-SVN: r271344
The rest of the Darwin ports now emit Lnnn$pb as the picbase
lable instead of the ancient (and hard to read) "L0000000nnn$pb".
This just updates this part of the rs6000 port, NFC intended.
2019-05-17 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000.c (machopic_output_stub): Adjust the
formatting of picbase labels to match other ports.
From-SVN: r271342
NFC intended, this simply adds a missing tab to the
generaed code.
2019-05-17 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000.c (macho_branch_islands): Fix bad indent
on the generated code.
From-SVN: r271341
fork() semantics can be problematic. Most unix style OS'es have
posix_spawn which can be used to replace fork + exec in many cases.
For more information see
e.g. https://www.microsoft.com/en-us/research/uploads/prod/2019/04/fork-hotos19.pdf
This replaces the one use of fork in libgfortran with posix_spawn.
2019-05-17 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/90038
* configure.ac (AC_CHECK_FUNCS_ONCE): Check for posix_spawn.
* intrinsics/execute_command_line (execute_command_line): Use
posix_spawn.
* Makefile.in: Regenerated.
* config.h.in: Regenerated.
* configure: Regenerated.
Regtested on x86_64-pc-linux-gnu.
From-SVN: r271340
We can scan stack for return address to get vector arguments passed on
stack.
Tested on Linux/x86-64 and Linux/x32.
* gcc.target/x86_64/abi/test_varargs-m128.c: New file.
* gcc.target/x86_64/abi/avx/test_varargs-m256.c: Likewise.
* gcc.target/x86_64/abi/avx512f/test_varargs-m512.c: Likewise.
From-SVN: r271329
Since MMX intrinsics are marked with SSE/SSE2/SSSE3 for SSE emulation,
enable them without SSE/SSE2/SSSE3 if MMX is enabled.
Restore TARGET_3DNOW check, which was changed to TARGET_3DNOW_A by
revision 271235.
gcc/
PR target/90497
* config/i386/i386-expand.c (ix86_expand_builtin): Enable MMX
intrinsics without SSE/SSE2/SSSE3.
* config/i386/mmx.md (mmx_uavgv8qi3): Restore TARGET_3DNOW
check.
(*mmx_uavgv8qi3): Likewise.
gcc/testsuite/
PR target/90497
* gcc.target/i386/pr90497-1.c: New test.
* gcc.target/i386/pr90497-2.c: Likewise.
From-SVN: r271328
This patch is updating all soft-fp from glibc, most changes are
copyright years update, and changes other than years update are
* soft-fp/extenddftf2.c: Use "_FP_W_TYPE_SIZE < 64" to check if
4_FP_W_TYPEs are used for IEEE quad precision.
* soft-fp/extendhftf2.c: Likewise.
* soft-fp/extendsftf2.c: Likewise.
* soft-fp/extendxftf2.c: Likewise.
* soft-fp/trunctfdf2.c: Likewise.
* soft-fp/trunctfhf2.c: Likewise.
* soft-fp/trunctfsf2.c: Likewise.
* soft-fp/trunctfxf2.c: Likewise.
* config/rs6000/ibm-ldouble.c: Likewise.
From-SVN: r271327
* testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
targets. Add more cases from P0608R3.
* testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
From-SVN: r271325
This is another attempt to reduce how often the assertions are
evaluated, so that code which doesn't try to use the function objects
doesn't need them to be invocable.
For _Rb_tree we access the _M_key_compare object directly, so can't put
the assertions in an accessor function for it. However, every invocation
of _M_key_compare is accompanied by a use of _S_key, so the assertions
can be put in there. For _Hashtable there are member functions that are
consistently used to obtain a hash code or test for equality, so the
assertions can go in those members.
PR libstdc++/85965
* include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
assertions from the destructor.
* include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
Move static_assert for hash function to here.
(_Hash_table_base::_M_equals): Move static_assert for equality
predicate to here.
* include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
Remove.
(_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
the value directly instead of calling _S_value.
(_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
(_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
_S_key(_Const_Link_type).
* testsuite/23_containers/set/85965.cc: Check construction,
destruction, assignment and size() do not trigger the assertions.
* testsuite/23_containers/unordered_set/85965.cc: Likewise.
* testsuite/23_containers/map/48101_neg.cc: Call find and adjust
expected errors.
* testsuite/23_containers/multimap/48101_neg.cc: Likewise.
* testsuite/23_containers/multiset/48101_neg.cc: Likewise.
* testsuite/23_containers/set/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
From-SVN: r271323
The current scheme used by the compiler for "gcbits" symbols involves
generating a symbol name based on a 32-char encoding of the bits data.
This scheme works well in most cases but can generate very long symbol
names in rare cases. To help avoid such long symbol names, switch to a
different encoding scheme based on the SHA1 digest of the payload if
the symbol size would be too large.
Fixesgolang/go#32083.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/177598
From-SVN: r271322