* configure.host (*-*-openbsd*) Set cpu_include_dir.
* config/os/bsd/openbsd/ctype_base.h: New file.
* config/os/bsd/openbsd/ctype_configure_char.cc: New file.
* config/os/bsd/openbsd/ctype_inline.h: New file.
* config/os/bsd/openbsd/os_defines.h: New file.
* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Use newlib locale model
for OpenBSD.
* configure: Regenerated.
From-SVN: r192334
PR tree-optimization/54877
* tree-vect-loop.c (vect_is_simple_reduction_1): For MINUS_EXPR
use make_ssa_name instead of copy_ssa_name.
* gcc.dg/torture/pr54877.c: New test.
From-SVN: r192322
In the example of this problem report, during the substituting of int
into 'function', tsubst_aggr_type fails for the alias ctxt1. This is
because TYPE_TEMPLATE_INFO looks for the TEMPLATE_INFO of the ctxt1
alias at the wrong place and was wrongly finding it to be NULL.
Namely, it was looking for it in the DECL_TEMPLATE_INFO of the
declaration of the type -- as if ctxt1 was an alias template
specialization -- rather than looking for it in its
CLASSTYPE_TEMPLATE_INFO.
Fixed thus. The other hunks of the patch are a cleanup to make a
better use of alias_template_specialization_p.
Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp
* cp-tree.h (TYPE_TEMPLATE_INFO): For an alias that is not an
instance of alias template, don't look for its TEMPLATE_INFO in
its declaration.
(alias_template_specialization_p): Take const_tree.
* pt.c (alias_template_specialization_p): Take a const_tree.
Don't call primary_template_instantiation_p.
(primary_template_instantiation_p): Call
alias_template_specialization_p.
gcc/testsuite/
* g++.dg/cpp0x/alias-decl-24.C: New test.
From-SVN: r192304
PR middle-end/54879
* combine.c (count_rtxs): Use RTX_BIN_ARITH resp. RTX_COMM_ARITH
instead of '2' resp. 'c' for GET_RTX_CLASS comparisons.
From-SVN: r192303
PR middle-end/54862
* simplify-rtx.c (simplify_truncation): Compare UINTVAL instead of
INTVAL of second argument with precision resp. op_precision.
From-SVN: r192302
On targets cris-elf, alpha and sparc (for instance) it can happen that
the attribute_tables variable is empty for fortran. Thus
register_scoped_attributes (called by init_attributes) won't call
register_scoped_attributes, so the hash table member of
scoped_attributes is not created.
Later when we try to e.g, lookup an attribute by calling
lookup_scoped_attribute_spec, that NULL member hash table comes to
byte us as htab_find_with_hash crashes.
This patch fixes this by ensuring in register_scoped_attributes that
the hash table is created.
Tested on cris-elf, x86_64-unknown-linux-gnu against trunk and some
commenters on the bug bootstrapped it on alpha and sparc.
gcc/
* attribs.c (register_scoped_attributes): Ensure the attribute
hash table is created.
From-SVN: r192301
The current implementation of C++11 attributes forbids them from being
applied to a type unless the type is being declared. I forgot to
adjust g++.dg/cpp0x/gen-attrs-{8,36,37}.C that was being run only on
ia32.
Fixed thus, tested on i386-unknown-linux-gnu and
x86_64-unknown-linux-gnu against trunk.
gcc/testsuite/
* g++.dg/cpp0x/gen-attrs-8.C: Update the test to reflect the fact
that c++11 attributes to types are ignored for now.
* g++.dg/cpp0x/gen-attrs-36.C: Likewise.
* g++.dg/cpp0x/gen-attrs-37.C: Likewise
From-SVN: r192300
A couple of obj-c++ tests were failing[1] because the tokens '[[' can
either be the beginning of a c++11 attribute (that is itself at the
beginning of a statement), or the beginning of a nested
objc-message-expression. This patch resolves the ambiguity by
tentatively parsing the c++11 attribute and if it fails, then consider
the objc-message-expression.
I missed this initially because it didn't occur to me that
--enable-languages=all,ada does not include obj-c++. Shame on me. I
have now updated my compile farm scripts to use
--enable-language=all,ada,obj-c++,go and I
[1]:
FAIL: obj-c++.dg/syntax-error-6.mm -fgnu-runtime (test for errors, line 11)
FAIL: obj-c++.dg/syntax-error-6.mm -fgnu-runtime (test for excess errors)
FAIL: obj-c++.dg/template-8.mm -fgnu-runtime (test for excess errors)
Tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp/
* parser (cp_parser_statement): Parse c++11 attributes tentatively.
(cp_parser_std_attribute_spec_seq): Do not warn too early about
using c++11 attributes in non c++11 mode.
From-SVN: r192299
2012-10-10 Richard Biener <rguenther@suse.de>
PR middle-end/54876
* ipa-prop.c (prune_expression_for_jf_1): New function.
(prune_expression_for_jf): Clear EXPR_LOCATION for all
sub-expressions as well.
From-SVN: r192293
* config/sparc/sparc.md (type attribute): Add new types 'visl'
(VIS logical operation), 'vismv' (VIS move), and 'pdistn'. Rename
'fgm_pdist' to 'pdist'.
(*movsi_insn): Use vismv and visl.
(*movdi_insn_sp64): Likewise.
(*movsf_insn): Likewise.
(*movdf_insn_sp64): Likewise.
(*mov<VM32:mode>_insn): Likewise, use 'fsrc2s' instead of 'fsrc1s'.
(*mov<VM64:mode>_insn_sp64): Likewise, use 'fsrc2s' instead of 'fsrc1s'.
(*mov<VM64:mode>_insn_sp32): Likewise, use 'fsrc2s' instead of 'fsrc1s'.
(VIS logical instructions): Mark as visl.
(pdist_vis): Use 'pdist'.
(pditsn<mode>_vis): Use 'pdistn'.
* config/sparc/ultra1_2.md: Adjust for new VIS attribute types.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/niagara4.md: Add cpu units "n4_slot2" and
"n4_load_store" for special store scheduling. Use them in load
and store reservations. Integer divide and multiply can only
issue in slot-1. Represent 1-cycle VIS moves and 3-cycle VIS
logic operations.
From-SVN: r192286
* cfghooks.h (struct cfg_hooks) <account_profile_record>: New hook.
(account_profile_record): New prototype.
* cfghooks.c (account_profile_record): New function.
* tree-cfg.c (gimple_account_profile_record): New function
(gimple_cfg_hooks): Add it.
* cfgrtl.c (rtl_account_profile_record): New function
(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Add it.
* passes.c (check_profile_consistency): Simplify. Move IR-dependent
code around using cfghooks machinery.
From-SVN: r192271
* configure.ac: Check for link.h and dl_iterate_phdr.
* elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
ELF macros before #defining them.
(dl_phdr_info, dl_iterate_phdr): Define if system does not have
dl_iterate_phdr.
(struct elf_syminfo_data): Add next field.
(elf_initialize_syminfo): Initialize next field.
(elf_add_syminfo_data): New static function.
(elf_add): New static function, broken out of
backtrace_initialize. Call backtrace_dwarf_add instead of
backtrace_dwarf_initialize.
(struct phdr_data): Define.
(phdr_callback): New static function.
(backtrace_initialize): Call elf_add.
* dwarf.c (struct dwarf_data): Add next and base_address fields.
(add_unit_addr): Add base_address parameter. Change all callers.
(add_unit_ranges, build_address_map): Likewise.
(add_line): Add ddata parameter. Change all callers.
(read_line_program, add_function_range): Likewise.
(dwarf_lookup_pc): New static function, broken out of
dwarf_fileline.
(dwarf_fileline): Call dwarf_lookup_pc.
(build_dwarf_data): New static function.
(backtrace_dwarf_add): New function.
(backtrace_dwarf_initialize): Remove.
* internal.h (backtrace_dwarf_initialize): Don't declare.
(backtrace_dwarf_add): Declare.
* configure, config.h.in: Rebuild.
From-SVN: r192267