/cp
2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
Fix small typos in the coding rule enforcement warnings.
* parser.c (cp_parser_namespace_definition): Replace 'namepace'
with 'namespace'.
/testsuite
2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
Fix small typos in the coding rule enforcement warnings.
* g++.dg/diagnostic/disable.C: Replace 'namepace'
with 'namespace'.
From-SVN: r228061
gcc/
* configure.ac (offload_targets, OFFLOAD_TARGETS): Separate
offload targets by commas, not colons.
* config.in: Regenerate.
* configure: Likewise.
* gcc.c (driver::maybe_putenv_COLLECT_LTO_WRAPPER): Due to that,
instead of setting up the default offload targets here...
(process_command): ..., do it here.
libgomp/
* plugin/configfrag.ac (OFFLOAD_TARGETS): Clarify that offload
targets are separated by commas.
* config.h.in: Regenerate.
From-SVN: r228053
2015-09-23 Richard Biener <rguenther@suse.de>
PR middle-end/67662
* fold-const.c (fold_binary_loc): Do not reassociate two vars with
undefined overflow unless they will cancel out.
* gcc.dg/ubsan/pr67662.c: New testcase.
From-SVN: r228051
Use find_opt instead of linear search through options in
handle_pragma_diagnostic (PR 49654) and reject non-warning options and
options not valid for the current language (PR 49655).
gcc/testsuite/ChangeLog:
2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/49655
* gcc.dg/pragma-diag-6.c: New test.
gcc/ChangeLog:
2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/49655
* opts.h (write_langs): Declare.
* opts-global.c (write_langs): Make it extern.
gcc/c-family/ChangeLog:
2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/49654
PR c/49655
* c-pragma.c (handle_pragma_diagnostic): Detect non-warning
options and options not valid for the current language.
From-SVN: r228049
gcc/c-family/ChangeLog:
* c-indentation.c (should_warn_for_misleading_indentation):
Float out and consolidate the calls to get_visual_column that
are passed guard_exploc as an argument. Compare
next_stmt_vis_column with guard_line_first_nws instead of with
body_line_first_nws.
gcc/testsuite/ChangeLog:
* c-c++-common/Wmisleading-indentation.c: Augment test.
From-SVN: r228027
The caller of try_shrink_wrapping wants to be returned a single edge to
put the prologue on. To make that work even if there are multiple edges
(all pointing to the PRO block) that need the prologue, add a new block
that becomes the destination of all such edges, and then jumps to PRO.
In the general case, some edges to PRO will need to be redirected, and
not all edges *can* be redirected. This adds a can_get_prologue function
that detects such cases. This then happily can also handle the "prologue
clobbers some reg that is live on the edge we want to insert it on" case.
Not all EDGE_CROSSING edges can be redirected, so handle those the same
as EDGE_COMPLEX edges.
2015-09-22 Segher Boessenkool <segher@kernel.crashing.org>
* function.c (thread_prologue_and_epilogue_insns): Delete
orig_entry_edge argument to try_shrink_wrapping.
* shrink-wrap.c (can_get_prologue): New function.
(can_dup_for_shrink_wrapping): Also handle EDGE_CROSSING.
(try_shrink_wrapping): Delete orig_entry_edge argument. Use
can_get_prologue where needed. Remove code that finds a single
edge for the prologue. Remove code that tests if any reg clobbered
by the prologue is live on the prologue edge. Remove code that finds
the new prologue edge after duplicating blocks. Make a new prologue
block and edge.
* shrink-wrap.h (try_shrink_wrapping): Delete orig_entry_edge argument.
From-SVN: r228022
gcc/c-family/
* c-common.h (abi_compat_version_crosses): New.
(warn_abi_version): Declare.
* c-common.c: Define it.
* c-opts.c (c_common_post_options): Handle it.
flag_abi_compat_version defaults to 8.
gcc/cp/
* mangle.c (abi_warn_or_compat_version_crosses): New.
Use it instead of abi_version_crosses.
(mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
From-SVN: r228017
2015-09-22 Chung-Lin Tang <cltang@codesourcery.com>
* config/nios2/nios2.c (nios2_legitimize_address): When handling
'reg + reloc' cases, allow first operand to be non-REG, and use
force_reg() to enforce address pattern.
From-SVN: r228012
2015-09-22 Matthew Wahab <matthew.wahab@arm.com>
* config/aarch64/aarch64.md
(<LOGICAL:optab>_one_cmpl_<SHIFT:optab><mode>3): Make a named
pattern.
From-SVN: r227999
In https://sourceware.org/ml/libc-alpha/2014-12/msg00300.html, we give a
"called from here" note without actually having a location, which looks
strange. I haven't been able to generate such a testcase. If this happens,
try to at least point to the current function being called. If that location is
also unknown, skip the extra note.
gcc/ChangeLog:
2015-09-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
* tree-inline.c (expand_call_inline): Use inform for extra note.
Do not give a note with UNKNOWN_LOCATION.
Replace input_location with gimple_location (stmt).
Use true/false instead of TRUE/FALSE.
gcc/testsuite/ChangeLog:
2015-09-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
* gcc.target/i386/inline_error.c (int bar): Use dg-message for note.
* gcc.target/i386/pr57756.c (static __inline int caller): Likewise.
* gcc.target/i386/pr59789.c (f1): Likewise.
* gcc.target/i386/intrinsics_5.c (__m128i foo): Likewise.
* gcc.target/i386/intrinsics_6.c: Likewise.
* gcc.dg/winline-5.c (int t): Likewise.
* gcc.dg/winline-9.c (t): Likewise.
* gcc.dg/always_inline2.c (q): Likewise.
* gcc.dg/winline-2.c (inline int t): Likewise.
* gcc.dg/winline-6.c: Likewise.
* gcc.dg/winline-10.c (void g): Likewise.
* gcc.dg/pr49243.c (void parse): Likewise.
* gcc.dg/always_inline3.c (q2): Likewise.
* gcc.dg/winline-3.c: Likewise.
* gcc.dg/winline-7.c (inline void *t): Likewise.
From-SVN: r227997
2015-09-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/67666
* tree-ssa-structalias.c (create_variable_info_for_1): Handle struct
with single field non-conservative.
* g++.dg/pr67666.C: New test.
From-SVN: r227996
gcc/
PR/67622
Revert:
2015-09-11 David S. Miller <davem@davemloft.net>
* config/sparc/constraints.md: Make "U" constraint a real register
constraint.
* config/sparc/sparc.c (TARGET_LRA_P): Define.
(D_MODES, DF_MODES): Add missing cast.
(TF_MODES, TF_MODES_NO_S): Include T_MODE.
(OF_MODES, OF_MODES_NO_S): Include O_MODE.
(sparc_register_move_cost): Decrease Niagara/UltrsSPARC memory
cost to 8.
* config/sparc/sparc.h (PROMOTE_MODE): Define.
* config/sparc/sparc.md (*movsi_lo_sum, *movsi_high): Do not
provide these insn when flag_pic.
2015-09-17 David S. Miller <davem@davemloft.net>
* config/sparc/sparc-protos.h (sparc_secondary_memory_needed):
Declare.
* config/sparc/sparc.c (sparc_secondary_memory_needed): New
function.
* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Use it.
(HARD_REGNO_CALLER_SAVE_MODE): Define.
* config/sparc/sparc.md (sethi_di_medlow, losum_di_medlow, seth44)
(setm44, setl44, sethh, setlm, sethm, setlo, embmedany_sethi)
(embmedany_losum, embmedany_brsum, embmedany_textuhi)
(embmedany_texthi, embmedany_textulo, embmedany_textlo): Do not
provide when flag_pic.
From-SVN: r227993
libgcc/
* config/ft32/crti-hw.S: Use __PMSIZE to allow configurable
memory layout. Deal correctly with BSS region larger than 32K.
Handle a watchdog reset like a power-on reset. Clean up unused
code.
From-SVN: r227986
2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67615
* resolve.c (gfc_resolve_code): Check for scalar expression in
arithmetic-if.
2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67615
* gfortran.dg/pr67615.f90: new test.
From-SVN: r227981
/c-family
2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
Complete the implementation of N4230, Nested namespace definition.
* c-cppbuiltin.c: Add __cpp_namespace_attributes and
__cpp_nested_namespace_definitions.
/cp
2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
Complete the implementation of N4230, Nested namespace definition.
* parser.c (cp_parser_namespace_definition): Support namespace
attributes both before and after the namespace identifier.
/testsuite
2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
Complete the implementation of N4230, Nested namespace definition.
* g++.dg/cpp1y/feat-cxx11-neg.C: Add tests for C++17 namespace
attributes and nested namespace definitions.
* g++.dg/cpp1y/feat-cxx98-neg.C: Likewise.
* g++.dg/cpp1z/feat-cxx1z.C: Likewise.
* g++.dg/cpp1y/feat-cxx14-neg.C: New.
* g++.dg/cpp1z/namespace-attribs.C: Likewise.
* g++.dg/cpp1z/nested-namespace-def1.C: Add tests for attributes
appearing before the namespace identifier.
From-SVN: r227977
linemap_position_for_loc_and_offset() tries to generate a location_t
encoding a column offset from the current location, for example, point
to a certain character inside a string. This is trivial to do when the
new location "fits within" the map of the original location. However,
it may happen that the (long) line corresponding to the original
location is encoded in several maps, thus the new location should
actually be encoded in a subsequent map from the original location.
This patch detects this case and adjusts the map correspondingly.
(This shows that the line-map representation is quite wasteful in this
case, because line-maps always start at column 0. That is, map[0]
highest location may encode up to line 8 column 80, then
map[1]->start_location starts encoding at line 8 column 0. Thus, there
are two location_t values that point to the same source location.)
libcpp/ChangeLog:
2015-09-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/66415
* line-map.c (linemap_position_for_loc_and_offset): Handle the
case of long lines encoded in multiple maps.
gcc/testsuite/ChangeLog:
2015-09-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/66415
* gcc.dg/cpp/pr66415-1.c: Test column number.
From-SVN: r227975
2015-09-21 Richard Biener <rguenther@suse.de>
* passes.c (rest_of_decl_compilation): Do not call
dwarf2out_early_global_decl for aliases.
* g++.dg/ext/attr-alias-3.C: Add -g.
From-SVN: r227973