Some users of is_parallel_of_n_reg_sets disregard the clobbers in a
parallel after it has returned "yes, this is a parallel of N sets and
maybe some clobbers". But combine uses a clobber of const0_rtx to
indicate substitution failure, so this leads to disaster.
Fix this by checking for such special clobbers in is_parallel_of_n_reg_sets.
PR rtl-optimization/68381
* combine.c (is_parallel_of_n_reg_sets): Return false if the pattern
is poisoned.
From-SVN: r230786
* ree.c (add_removable_extension): Avoid mis-optimizing cases where
the source/dest of the target extension require a different number of
hard registers.
(combine_set_extension): Remove #if 0 code.
Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r230785
PR go/68496
reflect: Allocate space for FFI functions returning a zero-sized type.
The libffi library does not understand zero-sized types. We represent
them as a struct with a single field of type void. If such a type is
returned from a function, libffi will copy 1 byte of data. Allocate
space for that byte, although we won't use it.
Fixes https://gcc.gnu.org/PR68496.
Reviewed-on: https://go-review.googlesource.com/17175
From-SVN: r230776
gcc/c/ChangeLog:
PR objc/68438
* c-parser.c (c_parser_postfix_expression): Set up source ranges
for various Objective-C constructs: Class.name syntax,
@selector(), @protocol(), @encode(), and [] message syntax.
gcc/testsuite/ChangeLog:
PR objc/68438
* objc.dg/plugin: New subdirectory.
* objc.dg/plugin/diagnostic-test-expressions-1.m: New test file.
* objc.dg/plugin/plugin.exp: New file, based on
gcc.dg/plugin/plugin.exp.
From-SVN: r230775
2015-11-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/68465
* tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children):
Also record equalities from multiple predecessor blocks if
only one non-backedge exists.
* gcc.dg/tree-ssa/ssa-fre-52.c: New testcase.
From-SVN: r230764
PR target/68363
* config/aarch64/aarch64.c (aarch64_madd_needs_nop): Reject arguments
that are not INSN_P.
* gcc.target/aarch64/pr68363_1.c: New test.
From-SVN: r230760
PR c++/68001
gcc/c-family
PR c++/68001
* c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
* cilk.c (recognize_spawn): Determine location in a more precise
way.
gcc/cp
* cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error.
gcc/testsuite
* g++.dg/cilk-plus/CK/pr68001.cc: New test.
From-SVN: r230755
2015-11-23 Richard Biener <rguenth@gcc.gnu.com>
Jiong Wang <jiong.wang@arm.com>
gcc/
PR tree-optimization/68317
PR tree-optimization/68326
* tree-vrp.c (adjust_range_with_scev): Call drop_tree_overflow if the
final min and max are not infinity.
gcc/testsuite/
* gcc.dg/pr68317.c: New testcase.
From-SVN: r230754
2015-11-23 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <botcazou@adacore.com>
* opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ,
Back_End_SJLJ and Back_End_ZCX.
(Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions,
SJLJ_Exceptions): New functions, reflecting properties of the current
Exception_Mechanism.
* opt.adb: Implement the new functions.
* fe.h: Bind the new Exception_Mechanism and helper functions for gigi.
* exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by
use of property helper and update comments.
(Expand_Exception_Handlers): Replace tests on mechanism by use of
helper. Restrict Abort_Defer to ZCX specifically.
* exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on
mechanism by calls to helper functions. Abort_Undefer for ZCX only,
paired with Expand_Exception_Handlers.
* exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism
by calls to helper functions. Abort_Undefer for ZCX only, paired with
Expand_Exception_Handlers.
* lib-writ.ads (P line documentation): Add entry for "FX",
representative of unit compiled with Frontend_Exceptions True.
* lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if
compiled with Frontend_Exceptions True.
* ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect
whether the ALI file contained an "FX" indication on the P line.
(Frontend_Exceptions_Specified): New boolean, to keep track of whether
at least an FX ALI file is in the closure.
* ali.adb (Scan_ALI): Handle "FX" on the P line.
(Initialize_ALI): Initialize Frontend_Exceptions_Specified to False.
* targparm.ads: Update desription of exception schemes.
(Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions
set to True in system.ads, or not set at all.
* targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions.
Rename ZCD to ZCX for consistency.
(FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly.
* gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism
setting, now from combination of Frontend_Exceptions and ZCX_By_Default.
* bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename
as ...
(Check_Consistent_Exception_Handling): Check consistency of both
ZCX_By_Default and Frontend_Exceptions.
(Check_Configuration_Consistency): Check_Consistent_Exception_Handling
if either flag was set at least once.
* make.adb (Check): Remove processing of a possible -fsjlj coming from
lang-specs.h.
* gnatlink.adb (Gnatlin): Likewise.
* gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set
both ZCX_By_Default and Frontend_Exceptions.
* gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable):
Use eh property helper to test for back-end exceptions. Adjust
mechanism name when testing for front-end sjlj.
(case E_Procedure): Likewise.
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
Likewise, and rename local variables.
(Exception_Handler_to_gnu_sjlj): Rename as
Exception_Handler_to_gnu_fe_sjlj.
(Exception_Handler_to_gnu_zcx): Rename as
Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms
to use property helpers or correct mechanism name.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r230752
2015-11-23 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/68460
* tree-parloops.c (gather_scalar_reductions): Also call
free_stmt_vec_info_vec if simple_loop_info == NULL.
* gcc.dg/autopar/pr68460.c: New test.
From-SVN: r230742
2015-11-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/68445
* tree-vect-slp.c (vect_create_mask_and_perm): Properly use
two different strides.
* gcc.dg/vect/pr68445.c: New testcase.
From-SVN: r230737
This patch fixes the treatment of symbol ref alignments for
arrays and structs in S390. Until now, the NOT_NATURALLY_ALIGNED flag
was not correctly set for array elements and structs larger than 8
bytes. Therefore, load relative instructions that require a specific
alignment would not always be generated. This patch uses separate flags
for 2-, 4-, and 8-byte alignment to fix the problem.
gcc/testsuite/ChangeLog:
2015-11-23 Robin Dapp <rdapp@linux.vnet.ibm.com>
* gcc.target/s390/load-relative-check.c: New test to check
generation of load relative instructions.
gcc/ChangeLog:
2015-11-23 Robin Dapp <rdapp@linux.vnet.ibm.com>
* config/s390/s390.h: Add new symref flags, _NOTALIGN2 etc.
* config/s390/s390.c (s390_check_symref_alignment): Use new
symref flags, early abort on wrong alignment
(s390_secondary_reload): Use new symref flags.
(s390_encode_section_info): Likewise.
* config/s390/predicates.md: Likewise.
From-SVN: r230735
gcc/ChangeLog:
2015-11-23 Kugan Vivekanandarajah <kuganv@linaro.org>
PR target/68390
* config/arm/arm.c (arm_function_ok_for_sibcall): Get function type
for indirect function call.
gcc/testsuite/ChangeLog:
2015-11-23 Kugan Vivekanandarajah <kuganv@linaro.org>
PR target/68390
* gcc/testsuite/gcc.c-torture/execute/pr68390.c: New test.
From-SVN: r230730
2015-11-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/write_float.def (output_float): Move block determining
room for leading zero to before checkng g0 formatting.
From-SVN: r230728
2015-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68486
* simplify.c (gfc_simplify_cshift): Add EXPR_OP to mix.
2015-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68486
* gfortran.dg/simplify_cshift_2.f90: New test.
From-SVN: r230726
* lto.c (iterative_hash_canonical_type): Always recurse for pointers.
(gimple_register_canonical_type_1): Check that pointers do not get
canonical types.
(gimple_register_canonical_type): Do not register pointers.
* tree.c (build_pointer_type_for_mode,build_reference_type_for_mode):
In LTO we do not compute TYPE_CANONICAL of pointers.
(gimple_canonical_types_compatible_p): Improve coments; sanity check
that pointers do not have canonical type that would make us believe
they are different.
* alias.c (get_alias_set): Do structural type equality on pointers;
enable pointer path for LTO; also glob pointer to vector with pointer
to vector element; glob pointers and references for LTO; do more strict
sanity checking about build_pointer_type returning the canonical type
which is also the main variant.
(record_component_aliases): When component type is pointer and we
do LTO; record void_type_node alias set.
From-SVN: r230715
2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org>
* simplify.c (gfc_simplify_cshift): Work around bootstrap issues
due to inappropriate warning options.
From-SVN: r230710
2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org>
* simplify.c (gfc_simplify_cshift): Implement simplification of CSHIFT.
(gfc_simplify_spread): Remove a FIXME and add error condition.
* intrinsic.h: Prototype for gfc_simplify_cshift
* intrinsic.c (add_functions): Use gfc_simplify_cshift.
2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org>
* gfortran.dg/simplify_cshift_1.f90: New test.
From-SVN: r230709