Hi,
The hook for TARGET_ASM_NAMED_SECTION was defined separately in
the backend around the time frame for GCC 4.7 under the assumption
that '@' would be used as a comment character in the binutils port.
This was indeed true in versions of the AArch64 port that never made it
into the FSF tree. However this practice was killed
before the binutils port made it upstream. Doing archaeology into
various revisions including the first commit of upstream binutils,
talking to Marcus about the history of this and actually testing the
first commit of binutils, I can confidently say that the upstream binutils
port never had any use of '@' as a comment character for AArch64
However we never got rid of the special cased handling in
GCC and the duplication of code in the AArch64 backend.
This was found when I was playing with Virtual Table verification
on ARM and AArch64 and discovered ICEs which were similar but manifested
in different places begging the obvious question.
Tested on aarch64-none-elf with no regressions.
Ok to apply ?
Ramana
2015-10-02 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/aarch64/aarch64.c (aarch64_elf_asm_named_section): Delete.
(TLS_SECTION_ASM_FLAG): Delete.
From-SVN: r228390
PR c/64249
* c-common.c (warn_duplicated_cond_add_or_warn): New function.
* c-common.h (warn_duplicated_cond_add_or_warn): Declare.
* c.opt (Wduplicated-cond): New option.
* c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
and pass it down to c_parser_if_statement.
(c_parser_else_body): Add CHAIN parameter and pass it down to
c_parser_statement_after_labels.
(c_parser_if_statement): Add CHAIN parameter. Add code to warn about
duplicated if-else-if conditions.
* parser.c (cp_parser_statement): Add CHAIN parameter and pass it
down to cp_parser_selection_statement.
(cp_parser_selection_statement): Add CHAIN parameter. Add code to
warn about duplicated if-else-if conditions.
(cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
it down to cp_parser_statement.
* doc/invoke.texi: Document -Wduplicated-cond.
* Makefile.in (insn-latencytab.o): Use -Wno-duplicated-cond.
(insn-dfatab.o): Likewise.
* genemit.c (gen_exp): Rewrite condition to avoid -Wduplicated-cond
warning.
* c-c++-common/Wduplicated-cond-1.c: New test.
* c-c++-common/Wduplicated-cond-2.c: New test.
* c-c++-common/Wduplicated-cond-3.c: New test.
* c-c++-common/Wduplicated-cond-4.c: New test.
* c-c++-common/Wmisleading-indentation.c (fn_37): Avoid
-Wduplicated-cond warning.
From-SVN: r228388
* gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
linear search with call to find_opt and issue warnings if the -W
switch is not appropriate.
From-SVN: r228379
* gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
* gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
reference but whose type isn't by-ref and whose mechanism hasn't been
forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
them instead of changing their type.
* gcc-interface/trans.c (scan_rhs_r): New helper function.
(independent_iterations_p): New predicate.
(Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
ivdep pragma if the iterations are independent.
From-SVN: r228377
PR rtl-optimization/67786
PR rtl-optimization/67787
* ifcvt.c (bb_valid_for_noce_process_p): Reject basic block if
it modifies a reg used in the condition calculation.
* gcc.dg/pr67786.c: New test.
* gcc.dg/pr67787.c: Likewise.
From-SVN: r228375
* gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
(Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
(finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
(build_stmt_group): Add blank lines.
From-SVN: r228373
PR target/51726
* config/i386/winnt.c (ix86_handle_selectany_attribute): Handle
selectany within this function without need to keep attribute.
(i386_pe_encode_section_info): Remove selectany-code.
From-SVN: r228370
2015-10-02 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (has_VN_INFO): New function.
(free_scc_vn): Use it.
(visit_use): Remove dead code and refactor to use gassign
and use less indentation.
From-SVN: r228369
After the shrink-wrapping patches the prologue will often be pushed
"deeper" into the function, which in turn means the software trace cache
pass will more often want to duplicate the basic block containing the
prologue. This caused failures for 32-bit SVR4 with -msecure-plt PIC.
This configuration uses the load_toc_v4_PIC_1 instruction, which creates
assembler labels without using the normal machinery for that. If now
the compiler decides to duplicate the insn, it will emit the same label
twice. Boom.
It isn't so easy to fix this to use labels the compiler knows about (let
alone test that properly). Instead, this patch wires up a "cannot_copy"
attribute to be used by TARGET_CANNOT_COPY_P, and sets that attribute on
these insns we do not want copied.
2015-10-01 Segher Boessenkool <segher@kernel.crashing.org>
PR target/67788
PR target/67789
* config/rs6000/rs6000.c (TARGET_CANNOT_COPY_INSN_P): New.
(rs6000_cannot_copy_insn_p): New function.
* config/rs6000/rs6000.md (cannot_copy): New attribute.
(load_toc_v4_PIC_1_normal): Set cannot_copy.
(load_toc_v4_PIC_1_476): Ditto.
gcc/testsuite/
PR target/67788
PR target/67789
* gcc.target/powerpc/pr67789.c: New testcase.
From-SVN: r228366
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran.67802
* decl.c (add_init_expr_to_sym): Numeric constant for character
length must be an INTEGER.
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran.67802
* gfortran.dg/pr67802.f90: New test.
From-SVN: r228365
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66979
* io.c (gfc_resolve_filepos): Check for a UNIT number. Add a nearby
missing 'return false'.
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66979
gfortran.dg/pr66979.f90: new test.
From-SVN: r228364
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67616
* primary.c (gfc_match_structure_constructor): Use a possibly
host-associated symtree to prevent ICE.
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67616
* gfortran.dg/pr67616.f90: New test.
From-SVN: r228363
Use sese_l throughout SCoP detection and create vec<scop_p> at the very end when
all SCoPs have been identified. 'struct sese_l' is very lightweight (two
pointers) compared to 'struct scop'.
No functional change intended. Passes regtest and bootstrap.
gcc/ChangeLog:
2015-10-01 Aditya Kumar <hiraditya@msn.com>
* graphite-scop-detection.c (struct sese_l): New conversion constructor
so that this type can be pushed into a vec.
(class scop_builder): use sese_l to collect scops.
(get_scops): New getter function.
(remove_intersecting_scops): Use sese_l instead of scops_p.
(intersects): Same.
(add_scop): Same.
(subsumes): Same.
(remove_subscops): Same.
(build_scops): Add scops to vec<scops_p> once all the scops have been
detected.
From-SVN: r228359
Renaming gimple_bb to gimple_poly_bb because there is a function gimple_bb
by the same name in gimple.h. No functional change intended.
Passes regtest and bootstrap.
gcc/ChangeLog:
2015-10-01 Aditya Kumar <hiraditya@msn.com>
* graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple):
Renamed type from gimple_bb_p to gimple_poly_bb_p.
(translate_isl_ast_node_user): Same.
* graphite-poly.c (new_poly_bb): Same.
* graphite-poly.h (gbb_from_bb): Same.
* sese.h: Same.
* graphite-sese-to-poly.c (new_gimple_bb): gimple_bb_p -> gimple_poly_bb_p
(build_scop_scattering): Same.
(find_params_in_bb): Same.
(add_conditions_to_domain): Same.
(sese_dom_walker::before_dom_children): Same.
(analyze_drs_in_stmts): Same.
(new_pbb_from_pbb): Same.
(free_data_refs_aux): New pointer to type base_alias_pair.
* graphite-sese-to-poly.h: Same.
* sese.c (if_region_set_false_region): Fixed Indentation.
(move_sese_in_condition): Same.
From-SVN: r228358
PR c++/54430
/cp
2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/54430
* name-lookup.c (push_binding): Make non-static.
* name-lookup.h (push_binding): Declare it.
* parser.c (cp_parser_range_for): Use it, get the range
declaration away from the scope until the range expression
has been parsed, then restore the declaration.
/testsuite
2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/54430
* g++.dg/cpp0x/range-for30.C: New.
From-SVN: r228354
I noticed that c.opt still described -std=c11 and related options as
experimental in the --help text. This patch fixes this.
Bootstrapped with no regressions on x86_64-pc-linux-gnu.
* c.opt (std=c11): Do not describe as experimental.
(std=gnu11): Likewise.
(std=iso9899:2011): Likewise.
From-SVN: r228349
Before our rewrite of the scop detection, we used to not have a valid SESE
region under hand, and so we used to do more ad-hoc analysis of data references
by trying to prove that at all levels of a loop nest the data references would
be still valid.
Now that we have a valid SESE region, we can call the scev analysis in the same
way on the same computed loop nest in the scop-detection as in the sese-to-poly.
Next step will be to cache the data references analyzed in the scop detection
and not compute the same info in sese-to-poly.
The patch fixes block-1.f90 that used to ICE on x86_64-linux when compiled with
-m32. Patch passed bootstrap with BOOT_CFLAGS="-g -O2 -fgraphite-identity
-floop-nest-optimize" and check on x86_64-linux using ISL-0.15.
2015-09-28 Sebastian Pop <s.pop@samsung.com>
Aditya Kumar <aditya.k7@samsung.com>
PR tree-optimization/67754
* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Call
scev analysis on the same loop nest as analyze_drs_in_stmts.
* graphite-sese-to-poly.c (outermost_loop_in_sese_1): Moved and renamed...
(try_generate_gimple_bb): Call outermost_loop_in_sese.
(analyze_drs_in_stmts): Same.
* sese.c (outermost_loop_in_sese): ...here.
Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228347
We now check that all data references in the current loop and inner loops
contained within loop are valid in an outer region before declaring that the
outer loop is a valid scop.
2015-09-30 Sebastian Pop <s.pop@samsung.com>
Aditya Kumar <aditya.k7@samsung.com>
PR tree-optimization/67754
* graphite-scop-detection.c (loop_body_is_valid_scop): Add missing
recursion on the inner loops.
Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228346
PR c/65345
* config/i386/i386.c (ix86_atomic_assign_expand_fenv): Adjust to use
create_tmp_var_raw rather than create_tmp_var.
* gcc.dg/atomic/pr65345-4.c: New test.
* gcc.dg/pr65345-3.c: New test.
From-SVN: r228343
* doc/xml/manual/diagnostics.xml: Document use of errno.
* doc/html/*: Regenerate.
* config/locale/generic/c_locale.cc (_Save_errno): New helper.
(__convert_to_v): Use _Save_errno.
* include/ext/string_conversions.h (__stoa): Only restore errno when
it isn't set to non-zero.
From-SVN: r228328
This adds an -freorder-blocks-algorithm=[simple|stc] flag, with "simple"
as default. For -O2 and up (except -Os) it is switched to "stc" instead.
Targets that never want STC can override this. This changes -freorder-blocks
to be on at -O1 and up (was -O2 and up).
In effect, the changes are for -O1 (which now gets "simple" instead of
nothing), -Os (which now gets "simple" instead of "stc", since STC results
in much bigger code), and for targets that wish to never use STC (not in
this patch though).
2015-09-23 Segher Boessenkool <segher@kernel.crashing.org>
* bb-reorder.c (reorder_basic_blocks): Use the algorithm selected
with flag_reorder_blocks_algorithm.
* common.opt (freorder-blocks-algorithm=): New flag.
(reorder_blocks_algorithm): New enum.
* flag-types.h (reorder_blocks_algorithm): New enum.
* opts.c (default_options_table): Use -freorder-blocks at -O1 and up,
and -freorder-blocks-algorithm=stc at -O2 and up (not at -Os).
From-SVN: r228318