Martin Liska [Wed, 7 Mar 2018 09:47:46 +0000 (10:47 +0100)]
Backport r256989
2018-03-07 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-23 Martin Liska <mliska@suse.cz>
PR lto/81440
* lto-symtab.c (lto_symtab_merge): Handle and do not warn about
trailing arrays at the end of a struct.
2018-03-07 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-23 Martin Liska <mliska@suse.cz>
PR lto/81440
* gcc.dg/lto/pr81440.h: New test.
* gcc.dg/lto/pr81440_0.c: New test.
* gcc.dg/lto/pr81440_1.c: New test.
Martin Liska [Wed, 7 Mar 2018 09:45:44 +0000 (10:45 +0100)]
Backport r257490
2018-03-07 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
* symtab.c: Include builtins.h
(symtab_node::output_to_lto_symbol_table_p): Move here
from lto-streamer-out.c:output_symbol_p.
* lto-streamer-out.c (write_symbol): Turn early exit to assert.
(output_symbol_p): Move all logic to symtab.c
(produce_symtab): Update.
2018-03-07 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* lto.c (unify_scc): Register prevailing trees, not trees to be freed.
(read_cgraph_and_symbols): Use
symtab_node::output_to_lto_symbol_table_p.
Martin Liska [Wed, 7 Mar 2018 09:44:03 +0000 (10:44 +0100)]
Backport r257412
2018-03-07 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/81004
* lto.c: Include builtins.h
(register_resolution): Merge resolutions in case trees was
merged across units.
(lto_maybe_register_decl): Break out from ...
(lto_read_decls): ... here.
(unify_scc): Also register decls here.
(read_cgraph_and_symbols): Sanity check that all resolutions was
read.
Martin Liska [Wed, 7 Mar 2018 09:43:23 +0000 (10:43 +0100)]
Backport r257183
2018-03-07 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/83954
* lto-symtab.c (warn_type_compatibility_p): Silence false positive
for type match warning on arrays of pointers.
2018-03-07 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR lto/83954
* gcc.dg/lto/pr83954.h: New testcase.
* gcc.dg/lto/pr83954_0.c: New testcase.
* gcc.dg/lto/pr83954_1.c: New testcase.
Eric Botcazou [Tue, 6 Mar 2018 12:21:50 +0000 (12:21 +0000)]
trans.c (convert_with_check): Fix typo in the condition guarding the overflow check emitted for the upper...
* gcc-interface/trans.c (convert_with_check): Fix typo in the condition
guarding the overflow check emitted for the upper bound of a floating-
point conversion.
Paul Thomas [Sat, 3 Mar 2018 18:00:39 +0000 (18:00 +0000)]
re PR fortran/78990 (ICE when assigning polymorphic array function result)
2018-03-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78990
* expr.c (gfc_is_class_array_function): Renamed from
'gfc_is_alloc_class_array_function' and modified to return true
for pointers as well as allocatable results.
* gfortran.h : Change of name for prototype of above function.
* trans-array.c (gfc_add_loop_ss_code): Force finalization of
class array results.
(build_class_array_ref): Change assertion into a condition.
(build_class_array_ref): Set the se class_vptr for class array
function results.
(gfc_walk_function_expr): Reference gfc_is_class_array_function
as above.
* trans-decl.c (get_proc_result): Move it up before
gfc_trans_deferred_vars.
(gfc_trans_deferred_vars): Nullify explicit return class arrays
on entry.
* trans-expr.c (gfc_conv_class_to_class): Allow conversion of
class array functions that have an se class_vptr and use it
for the result vptr.
(gfc_conv_subref_array_arg): Rename reference to the above
function.
(gfc_conv_procedure_call): Ditto. Add the se pre block to the
loop pre block before the function is evaluated. Do not
finalize class pointer results.
(arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
renamed references.
* trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
2018-03-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78990
* gfortran.dg/class_67.f90: New test.
Alan Modra [Wed, 28 Feb 2018 08:07:35 +0000 (18:37 +1030)]
gcc testsuite changes for new linker messages
GNU ld error messages have changed to comply with the GNU coding
standards.
* lib/prune.exp (prune_gcc_output): Match lower case "in function"
GNU ld message.
* g++.dg/other/anon5.C: Match lower case "bad value" GNU ld message.
Jerry DeLisle [Fri, 23 Feb 2018 19:53:04 +0000 (19:53 +0000)]
backport: re PR fortran/84506 (INQUIRE(pos=) always sets pos=0 with -fdefault-integer-8)
2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/84506
* trans-io.c (set_parameter_value_inquire): Adjust range check of
negative unit values for kind=8 units to the kind=4 negative limit.
Steven G. Kargl [Mon, 12 Feb 2018 18:25:41 +0000 (18:25 +0000)]
re PR fortran/54223 (Statement function statement with dummy arguments that are also OPTIONAL may crash in wrong calls)
2018-02-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54223
PR fortran/84276
* interface.c (compare_actual_formal): Add in_statement_function
bool parameter. Skip check of INTENT attribute for statement
functions. Arguments to a statement function cannot be optional,
issue error for missing argument.
(gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
in_statement_function.
2018-02-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54223
PR fortran/84276
* gfortran.dg/statement_function_1.f90: New test.
* gfortran.dg/statement_function_2.f90: New test.
Bill Schmidt [Wed, 24 Jan 2018 21:12:55 +0000 (21:12 +0000)]
backport: rs6000-p8swap.c (swap_feeds_both_load_and_store): New function.
2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
New function.
(rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
swap associated with both a load and a store.
Max Filippov [Tue, 23 Jan 2018 21:54:09 +0000 (21:54 +0000)]
libgcc: xtensa: fix NaN return from add/sub/mul/div helpers
libgcc/
2018-01-23 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
2018-01-23 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/ieee754-df.S (__addsf3, __subsf3, __mulsf3)
(__divsf3): Make NaN return value quiet.
* config/xtensa/ieee754-sf.S (__adddf3, __subdf3, __muldf3)
(__divdf3): Make NaN return value quiet.
Michael Meissner [Tue, 23 Jan 2018 15:07:00 +0000 (15:07 +0000)]
backport: re PR target/83862 (powerpc: ICE in signbit testcase)
[gcc]
2018-01-23 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/83862
* config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
no longer used.
* config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
* config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
128-bit to produce an UNSPEC move to get the double word with the
signbit and then a shift directly to do signbit.
(signbit<mode>2_dm): Replace old IEEE 128-bit signbit
implementation with a new version that just does either a direct
move or a regular move. Move memory interface to separate insns.
Move insns so they are next to the expander.
(signbit<mode>2_dm_mem_be): New combiner insns to combine load
with signbit move. Split big and little endian case.
(signbit<mode>2_dm_mem_le): Likewise.
(signbit<mode>2_dm_<su>ext): Delete, no longer used.
(signbit<mode>2_dm2): Likewise.
[gcc/testsuite]
2018-01-23 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/83862
* gcc.target/powerpc/pr83862.c: New test.