2016-07-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/71901
* tree-ssa-sccvn.h (struct vn_reference_op_struct): Add
align member, group stuff with the bitfield.
(vn_ref_op_align_unit): New inline.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): For ARRAY_REFs
record element alignment and operand 3 unchanged.
(ao_ref_init_from_vn_reference): Adjust.
(valueize_refs_1): Likewise.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
* gcc.dg/torture/pr71901.c: New testcase.
From-SVN: r238468
2016-07-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/71908
* tree-ssa-structalias.c (get_constraint_for_component_ref): Handle
symbolic constants in a more reliable way.
* gcc.dg/torture/pr71908.c: New testcase.
From-SVN: r238467
2016-07-19 Richard Biener <rguenther@suse.de>
PR lto/71907
* lto-streamer-out.c (DFS::DFS_write_tree_body): For blocks
with an abstract origin that is not an inlined function outer
scope add a self-reference as abstract origin.
* tree-streamer-out.c (write_ts_block_tree_pointers): Likewise.
From-SVN: r238456
[gcc]
2016-07-18 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71493
* config/rs6000/rs6000.c (rs6000_function_value): Fix
unintentional System V.4 structure return breakage for structures
with a single floating point element.
[gcc/testsuite]
2016-07-18 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71493
* gcc.target/powerpc/pr71493-1.c: New test.
* gcc.target/powerpc/pr71493-2.c: Likewise.
From-SVN: r238454
PR c++/70869
PR c++/71054
* cp-gimplify.c (cp_genericize_r): Revert the 2016-07-07 change.
* tree.c (cp_walk_subtrees): For DECL_EXPR on DECL_ARTIFICIAL
non-static VAR_DECL, walk the decl's DECL_INITIAL, DECL_SIZE and
DECL_SIZE_UNIT.
From-SVN: r238444
PR c++/71835
* call.c (build_op_call_1): Use convert_like_with_context only
if cand->fn is a decl.
* g++.dg/conversion/ambig3.C: New test.
From-SVN: r238443
PR c++/71828
* constexpr.c (cxx_eval_constant_expression) <case REALPART_EXPR>:
For lval don't use cxx_eval_unary_expression and instead recurse
and if needed rebuild the reference.
* g++.dg/cpp0x/constexpr-71828.C: New test.
From-SVN: r238442
The attached patch fixes a warning during Linux kernel compilation
on S/390 due to -mwarn-dynamicstack and runtime alignment of stack
variables with constant size causing cfun->calls_alloca to be set
(even if alloca is not used at all). The patched code places
constant size runtime aligned variables in the "virtual stack
vars" area instead of creating a "virtual stack dynamic" area.
This behaviour is activated by defining
#define ALLOCATE_DYNAMIC_STACK_SPACE_IN_PROLOGUE 1
in the backend; otherwise the old logic is used.
The kernel uses runtime alignment for the page structure (aligned
to 16 bytes), and apart from triggereing the alloca warning
(-mwarn-dynamicstack), the current Gcc also generates inefficient
code like
aghi %r15,-160 # prologue: create stack frame
lgr %r11,%r15 # prologue: generate frame pointer
aghi %r15,-32 # space for dynamic stack
which could be simplified to
aghi %r15,-192
(if later optimization passes are able to get rid of the frame
pointer). Is there a specific reason why the patched behaviour
shouldn't be used for all platforms?
--
As the placement of runtime aligned stack variables with constant
size is done completely in the middleend, I don't see a way to fix
this in the backend.
gcc/ChangeLog:
2016-07-18 Dominik Vogt <vogt@linux.vnet.ibm.com>
* cfgexpand.c (expand_stack_vars): Implement synamic stack space
allocation in the prologue.
* explow.c (get_dynamic_stack_base): New function to return an address
expression for the dynamic stack base.
(get_dynamic_stack_size): New function to do the required dynamic stack
space size calculations.
(allocate_dynamic_stack_space): Use new functions.
(align_dynamic_address): Move some code from
allocate_dynamic_stack_space to new function.
* explow.h (get_dynamic_stack_base, get_dynamic_stack_size): Export.
gcc/testsuite/ChangeLog:
2016-07-18 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.target/s390/warn-dynamicstack-1.c: New test.
* gcc.dg/stack-usage-2.c (foo3): Adapt expected warning.
stack-layout-dynamic-1.c: New test.
From-SVN: r238432
gcc/ChangeLog:
2016-07-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_encode_section_info): Always set
notaligned marker if mode size is 0 or no MEM_ALIGN info could be
found.
gcc/testsuite/ChangeLog:
2016-07-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/nolrl-1.c: New test.
From-SVN: r238427
* config/pa/pa.c (hppa_profile_hook): Allocate stack space for
register parameters. Remove code to initialize argument pointer
on TARGET_64BIT. Optimize call to _mcount when it can be reached
using a pc-relative branch. Cleanup conditional code.
* config/pa/pa.md (call_mcount): New expander.
(call_mcount_nonpic): New insn.
(call_mcount_pic): New insn and split.
(call_mcount_pic_post_reload): New insn.
(call_mcount_64bit): New insn and split.
(call_mcount_64bit_post_reload): New insn.
From-SVN: r238414
2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Marco Restelli <mrestelli@gmail.com>
PR fortran/62125
* symbol.c (select_type_insert_tmp): Recursively call self to take care
of nested select type.
* gfortran.dg/pr62125.f90: New test.
Co-Authored-By: Marco Restelli <mrestelli@gmail.com>
From-SVN: r238400
gcc/c/
* c-parser.c (c_parser_oacc_declare): Don't scan for
GOMP_MAP_POINTER.
* c-typeck.c (handle_omp_array_sections): Mark data clauses with
GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
zero-length subarrays.
gcc/cp/
* parser.c (cp_parser_oacc_declare): Don't scan for
GOMP_MAP_POINTER.
* semantics.c (handle_omp_array_sections): Mark data clauses with
GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
zero-length subarrays.
gcc/
* omp-low.c (lower_omp_target): Mark data clauses with
GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
zero-length subarrays.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/zero_length_subarrays.c: New
test.
From-SVN: r238376
2016-07-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/71881
* tree-loop-distribution.c (destroy_loop): Remove blocks in
reverse DOM order to make debug temp generation happy.
* gcc.dg/torture/pr71881.c: New testcase.
From-SVN: r238374
2016-07-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/71887
* tree-ssa-phiopt.c (absorbing_element_p): Add rhs arg and
verify it is not zero for division / modulo handling.
(value_replacement): Adjust.
* gcc.dg/torture/pr71887.c: New testcase.
From-SVN: r238373