PR other/54749
* fileline.c (fileline_initialize): Pass errnum as -1 when
reporting that we could not read executable information after a
previous failure.
From-SVN: r191855
gcc/testsuite/
* g++.dg/warn/Wunused-local-typedefs-3.C: Move the c++-only test
gcc/testsuite/c-c++-common/Wunused-local-typedefs-2.c to here.
From-SVN: r191832
In the example of this patch, gcc/g++ invoked with
-Wunused-local-typedefs warns on dependant entities even when those
are decorated with the 'unused' attribute.
This is because in cplus_decl_attributes, save_template_attributes
makes so that the 'unused' attribute is applied to its appertaining
entity only at instantiation time. But then at parsing time
maybe_warn_unused_local_typedefs checks for TREE_USED before warning.
This patch applies the 'unused' attribute at compilation time.
Tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp/
* decl2.c (is_late_template_attribute): "unused" attribute is to
be applied at compile time.
gcc/testsuite/
* c-c++-common/Wunused-local-typedefs-2.c: New test.
From-SVN: r191830
In the example of the patch, g++ fails to warn that the variable N::i
(introduced via a using declaration) is unused.
This is because as we want to emit the warning in poplevel, when we
walk the local bindings returned by getdecls, we forget that a
VAR_DECL introduced by a using declaration is represented by a
TREE_LIST which TREE_VALUE is the VAR_DECL, and we wrongly look for a
bare VAR_DECL.
Fixed thus and tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp/
* decl.c (poplevel<warn_unused*>): Do not forget that some local
bindings are represented by a TREE_LIST.
gcc/testsuite/
* g++.dg/warn/Wunused-var-18.C: New test.
From-SVN: r191829
We don't record the use of a typedef when it's used through a
typename. Fixed thus.
Tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp/
* decl.c (make_typename_type): Record the use of typedefs.
gcc/testsuite/
* g++.dg/warn/Wunused-local-typedefs-2.C: New test.
From-SVN: r191828
PR target/54716
* config/i386/predicates.md (nonimmediate_or_const_vector_operand):
New predicate.
* config/i386/i386.c (ix86_expand_vector_logical_operator): New
function.
* config/i386/i386-protos.h (ix86_expand_vector_logical_operator): New
prototype.
* config/i386/sse.md (<code><mode>3 VI logic): Use it.
* gcc.target/i386/xorps-sse2.c: Remove xfails.
From-SVN: r191827
PR tree-optimization/54713
* fold-const.c (vec_cst_ctor_to_array): Give up if vector CONSTRUCTOR
has vector elements.
(fold_ternary_loc) <case BIT_FIELD_REF>: Likewise.
* tree-vect-generic.c (vector_element): Don't rely on CONSTRUCTOR elts
indexes. Use BIT_FIELD_REF if CONSTRUCTOR has vector elements.
(lower_vec_perm): Use NULL_TREE CONSTRUCTOR indexes.
* gcc.c-torture/compile/pr54713-1.c: New test.
* gcc.c-torture/compile/pr54713-2.c: New test.
* gcc.c-torture/compile/pr54713-3.c: New test.
From-SVN: r191826
* config/avr/avr.md (adjust_len): Add lpm.
(reload_in<mode>): Use avr_out_lpm for output. Use "lpm" for
adjust_len.
* config/avr/avr-protos.h (avr_out_lpm): New prototype.
* config/avr/avr.c (avr_out_lpm): Make global.
(adjust_insn_length): Handle ADJUST_LEN_LPM.
From-SVN: r191825
2012-09-28 Richard Guenther <rguenther@suse.de>
PR lto/47799
* lto-streamer-out.c (tree_is_indexable): Make PARM_DECLs global.
(lto_output_tree_ref): Handle references to them.
(output_function): Do not output function arguments again.
* lto-streamer-in.c (input_function): Do not input arguments
again, nor overwrite them.
From-SVN: r191824
ChangeLog:
* lower-subreg.c (enum classify_move_insn): Rename
SIMPLE_PSEUDO_REG_MOVE to DECOMPOSABLE_SIMPLE_MOVE.
(find_decomposable_subregs): Update.
(decompose_multiword_subregs): Add DECOMPOSE_COPIES parameter.
Only mark pseudo-to-pseudo copies as DECOMPOSABLE_SIMPLE_MOVE
if that parameter is true.
(rest_of_handle_lower_subreg): Call decompose_multiword_subregs
with DECOMPOSE_COPIES false.
(rest_of_handle_lower_subreg2): Call decompose_multiword_subregs
with DECOMPOSE_COPIES true.
testsuite/ChangeLog:
* gcc.dg/lower-subreg-1.c: Disable on arm-*-* targets.
From-SVN: r191805
2012-09-27 Richard Guenther <rguenther@suse.de>
PR lto/54709
* lto-symtab.c (resolution_guessed_p): Remove.
(set_resolution_guessed): Likewise.
(lto_symtab_register_decl): Remove assert.
(lto_symtab_resolve_symbols): Do not alter symbol resolutions
and return the prevailing symbol, checking for multiple prevailing
symbols here.
(lto_symtab_merge_decls_1): Use the result from
lto_symtab_resolve_symbols. Do not alter symbol resolutions.
* gcc.dg/lto/pr54709_0.c: New testcase.
* gcc.dg/lto/pr54709_1.c: Likewise.
From-SVN: r191798