1. 01 Nov, 2012 2 commits
    • Daily bump. · d81aa388
      From-SVN: r193056
      GCC Administrator committed
    • tree-eh.c (do_return_redirection): Set location for jump statement. · 29f5bccb
      gcc:
      2012-10-31  Dehao Chen  <dehao@google.com>
      
      	* tree-eh.c (do_return_redirection): Set location for jump statement.
      	(do_goto_redirection): Likewise.
      	(frob_into_branch_around): Likewise.
      	(lower_try_finally_nofallthru): Likewise.
      	(lower_try_finally_copy): Likewise.
      	(lower_try_finally_switch): Likewise.
      	* expr.c (store_expr): Use current insn location instead of expr
      	location.
      	(expand_expr_real): Likewise.
      	(expand_expr_real_1): Likewise.
      
      gcc/testsuite:
      2012-10-31  Dehao Chen  <dehao@google.com>
      
      	* g++.dg/debug/dwarf2/block.C: New testcase.
      
      From-SVN: r193053
      Dehao Chen committed
  2. 31 Oct, 2012 38 commits
    • re PR target/54938 (sh libgcc_unpack_df.o fails to build:… · 0f379f76
      re PR target/54938 (sh libgcc_unpack_df.o fails to build: ../../../srcw/libgcc/fp-bit.h:221:19: internal compiler error: in emit_cmp_and_jump_insn_1, at optabs.c:4273)
      
      2012-10-31   Easwaran Raman  <eraman@google.com>
      
      	PR target/54938
      	PR middle-end/54957
      	* optabs.c (emit_cmp_and_jump_insn_1): Add REG_BR_PROB note
      	only if it doesn't already exist.
      	* stmt.c (get_outgoing_edge_probs): Return 0 if BB is NULL.
      	(emit_case_dispatch_table): Handle the case where STMT_BB is
      	NULL.
      	(expand_sjlj_dispatch_table): Pass BB containing before_case
      	to emit_case_dispatch_table.
      
      From-SVN: r193052
      Easwaran Raman committed
    • This patch implements generic type query and conversion functions, · 5d59b5e1
      and applies them to the use of cgraph_node, varpool_node, and symtab_node.
      
      The functions are:
      
      bool is_a <TYPE> (pointer)
        Tests whether the pointer actually points to a more derived TYPE.
      
      TYPE *as_a <TYPE> (pointer)
        Converts pointer to a TYPE*.
      
      TYPE *dyn_cast <TYPE> (pointer)
        Converts pointer to TYPE* if and only if "is_a <TYPE> pointer".
        Otherwise, returns NULL.
        This function is essentially a checked down cast.
      
      These functions reduce compile time and increase type safety when treating a
      generic item as a more specific item.  In essence, the code change is from
      
        if (symtab_function_p (node))
          {
            struct cgraph_node *cnode = cgraph (node);
            ....
          }
      
      to
      
        if (cgraph_node *cnode = dyn_cast <cgraph_node> (node))
          {
            ....
          }
      
      The necessary conditional test defines a variable that holds a known good
      pointer to the specific item and avoids subsequent conversion calls and
      the assertion checks that may come with them.
      
      When, the property test is embedded within a larger condition, the variable
      declaration gets pulled out of the condition.  (This leaves some room for
      using the variable inappropriately.)
      
        if (symtab_variable_p (node)
            && varpool (node)->finalized)
          varpool_analyze_node (varpool (node));
      
      becomes
      
        varpool_node *vnode = dyn_cast <varpool_node> (node);
        if (vnode && vnode->finalized)
          varpool_analyze_node (vnode);
      
      Note that we have converted two sets of assertions in the calls to varpool
      into safe and efficient use of a variable.
      
      
      There are remaining calls to symtab_function_p and symtab_variable_p that
      do not involve a pointer to a more specific type.  These have been converted
      to calls to a functions is_a <cgraph_node> and is_a <varpool_node>.  The
      original predicate functions have been removed.
      
      The cgraph.h header defined both a struct and a function with the name
      varpool_node.  This name overloading can cause some unintuitive error messages
      when, as is common in C++, one omits the struct keyword when using the type.
      I have renamed the function to varpool_node_for_decl.
      
      Tested on x86_64.
      
      
      Index: gcc/ChangeLog
      
      2012-10-31  Lawrence Crowl  <crowl@google.com>
      
      	* is-a.h: New.
      	(is_a <T> (U*)): New.  Test for is-a relationship.
      	(as_a <T> (U*)): New.  Treat as a derived type.
      	(dyn_cast <T> (U*)): New.  Conditionally cast based on is_a.
      	* cgraph.h (varpool_node): Rename to varpool_node_for_decl.
      	Adjust callers to match.
      	(is_a_helper <cgraph_node>::test (symtab_node_def *)): New.
      	(is_a_helper <varpool_node>::test (symtab_node_def *)): New.
      	(symtab_node_def::try_function): New.  Change most calls to
      	symtab_function_p with calls to dyn_cast <cgraph_node> (p).
      	(symtab_node_def::try_variable): New.  Change most calls to
      	symtab_variable_p with calls to dyn_cast <varpool_node> (p).
      	(symtab_function_p): Remove.  Change callers to use
              is_a <cgraph_node> (p) instead.
      	(symtab_variable_p): Remove.  Change callers to use
              is_a <varpool_node> (p) instead.
      	* cgraph.c (cgraph_node_for_asm): Remove redundant call to
      	symtab_node_for_asm.
      	* cgraphunit.c (symbol_finalized_and_needed): New.
      	(symbol_finalized): New.
      	(cgraph_analyze_functions): Split complicated conditionals out into
      	above new functions.
      	* Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h.
      
      From-SVN: r193051
      Lawrence Crowl committed
    • * gcc.dg/pr44974.c: Add noinline. · 2a381a57
      From-SVN: r193050
      Jan Hubicka committed
    • Fix PR number typo in ChangeLog. · dbbb73dd
      From-SVN: r193049
      Oleg Endo committed
    • re PR fortran/53718 ([OOP] gfortran generates asm label twice in the same output file) · 755634e6
      2012-10-31  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/53718
      	* trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed.
      	* trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove
      	GFC_DECL_PUSH_TOPLEVEL.
      	(build_function_decl): Do not push __copy procedure to toplevel.
      
      2012-10-31  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/53718
      	* gfortran.dg/class_54.f90: New.
      
      From-SVN: r193048
      Janus Weil committed
    • re PR tree-optimization/55018 (CDDCE pass is too aggressive sometimes with… · 03b06a83
      re PR tree-optimization/55018 (CDDCE pass is too aggressive sometimes with infinite loops and with some functions)
      
      gcc/
      	PR tree-optimization/55018
      	* basic-block.h (dfs_find_deadend): New prototype.
      	* cfganal.c (dfs_find_deadend): No longer static.  Use bitmap
      	instead of sbitmap for visited.
      	(flow_dfs_compute_reverse_execute): Use dfs_find_deadend here, too.
      	* dominance.c (calc_dfs_tree): If saw_unconnected,
      	traverse from dfs_find_deadend of unconnected b
      	instead of b directly.
      
      testsuite/
      	PR tree-optimization/55018
      	* gcc.dg/torture/pr55018.c: New test.
      
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r193047
      Steven Bosscher committed
    • runtime/goc2c: Drop gc support, change int to intgo. · e212c7f5
      From-SVN: r193046
      Ian Lance Taylor committed
    • i386.c (ix86_expand_prologue): Emit frame info for the special register pushes… · 2455de38
      i386.c (ix86_expand_prologue): Emit frame info for the special register pushes before frame probing and allocation.
      
      	* config/i386/i386.c (ix86_expand_prologue): Emit frame info for the
      	special register pushes before frame probing and allocation.
      
      From-SVN: r193044
      Eric Botcazou committed
    • re PR c++/54583 (Spurious warning: value computed is not used with variable-size array) · 03d31730
      /cp
      2012-10-31  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/54583
      	* tree.c (build_cplus_array_type): Set TREE_NO_WARNING on the
      	TYPE_SIZE of VLAs.
      
      /testsuite
      2012-10-31  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/54583
      	* g++.dg/ext/vla13.C: New.
      
      From-SVN: r193043
      Paolo Carlini committed
    • re PR middle-end/55150 (Crash in copy_rtx) · 4d64ce5c
      2012-10-31  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR middle-end/55150
      	* lra-constraints.c (lra_constraints): Update debug insn info
      	after equivalence change.
      
      2012-10-31  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR middle-end/55150
      	* gcc.dg/pr55150.c: New test.
      
      From-SVN: r193042
      Vladimir Makarov committed
    • re PR fortran/55134 (associate construct and assumed size array) · 2d98d2b4
      2012-10-31  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/55134
              * trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED
              * as
              array with descriptor.
      
      2012-10-31  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/55134
              * gfortran.dg/associate_11.f90: New.
      
      From-SVN: r193041
      Tobias Burnus committed
    • validate_failures.py: Fix parsing of summary lines. · 3b1de8eb
      	* testsuite-management/validate_failures.py: Fix parsing
      	of summary lines.
      
      From-SVN: r193039
      Diego Novillo committed
    • ipa-inline.c (ipa_inline): Avoid infinite loop on inlining empty virtual… · e3c7b49c
      ipa-inline.c (ipa_inline): Avoid infinite loop on inlining empty virtual functions calling themselves.
      
      
      	* ipa-inline.c (ipa_inline): Avoid infinite loop on inlining
      	empty virtual functions calling themselves.
      
      From-SVN: r193038
      Jan Hubicka committed
    • complex.c (csqrtq): NaN and INF fixes. · 737df6e6
      2012-10-31  Tobias Burnus  <burnus@net-b.de>
                  Joseph Myers <joseph@codesourcery.com>
                  David S. Miller <davem@davemloft.net>
                  Ulrich Drepper <drepper@redhat.com>
                  Marek Polacek <polacek@redhat.com>:
                  Petr Baudis <pasky@suse.cz>
      
              * math/complex.c (csqrtq): NaN and INF fixes.
              * math/sqrtq.c (sqrt): NaN, INF and < 0 fixes.
              * math/expm1q.c (expm1q): Changes from GLIBC. Use expq for
              large parameters. Fix errno for boundary conditions.
              * math/finiteq.c (finiteq): Add comment.
              * math/fmaq.c (fmaq): Changes from GLIBC. Fix missing underflows
              and bad results for some subnormal results. Fix sign of inexact
              zero return. Fix sign of exact zero return.
              Ensure additions are not scheduled after fetestexcept.
              * math/jnq.c (jnq): Changes from GLIBC. Set up errno properly
              for ynq. Fix jnq precision.
              * math/nearbyintq.c (nearbyintq): Changes from GLIBC. Do not
              manipulate bits before adding and subtracting TWO112[sx].
              * math/rintq.c (rintq): Ditto.
              * math/scalbnq.c (scalbnq): Changes from GLIBC. Fix integer
              overflow.
      
      
      Co-Authored-By: David S. Miller <davem@davemloft.net>
      Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
      Co-Authored-By: Ulrich Drepper <drepper@redhat.com>
      
      From-SVN: r193037
      Tobias Burnus committed
    • re PR other/50899 (need @direntry for gcov) · be028f91
      	PR other/50899
      	* doc/gcc.texi: Add @direntry for gcov.
      
      From-SVN: r193036
      Tom Tromey committed
    • Uppercase in ChangeLog. · c89e29b4
      From-SVN: r193034
      Marc Glisse committed
    • os_defines.h: Do not define anymore _GLIBCXX_HAVE_BROKEN_VSWPRINTF. · 261f93e0
      2012-10-31  Jonathan Yong  <jon_y@users.sourceforge.net>
      
      	* config/os/mingw32-w64/os_defines.h: Do not define anymore
      	_GLIBCXX_HAVE_BROKEN_VSWPRINTF.
      
      From-SVN: r193033
      Jonathan Yong committed
    • os_defines.h: Do not define anymore _GLIBCXX_HAVE_BROKEN_VSWPRINTF. · e3b74442
      2012-10-31  Jonathan Yong  <jon_y@users.sourceforge.net>
      
      	* config/os/mingw32-w64/os_defines.h: Do not define anymore
      	_GLIBCXX_HAVE_BROKEN_VSWPRINTF.
      
      From-SVN: r193032
      Jonathan Yong committed
    • PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration · e82b2e88
      In this PR, g++ embarrassingly fails to parse the simple alignas
      expression below:
      
          alignas(double) int f;
      
      even though the simple-declaration production in Clause 7 suggests
      otherwise.
      
      Fixed thus and tested on x86_64-unknown-linux-gnu against trunk.
      
      gcc/cp
      
      	PR c++/54955
      	* parser.c (cp_nth_tokens_can_be_std_attribute_p): Recognize the
      	'Alignas' keyword as the beginning of a c++11 attribute specifier.
      	Update the comment of the function.
      	(cp_next_tokens_can_be_gnu_attribute_p): Update the comment of the
      	function.
      
      gcc/testsuite/
      
      	PR c++/54955
      	* g++.dg/cpp0x/gen-attrs-48-2.C: New test.
      
      From-SVN: r193029
      Dodji Seketeli committed
    • re PR tree-optimization/19105 (fold does not spot anti-range test) · d578e863
      	PR tree-optimization/19105
      	PR tree-optimization/21643
      	PR tree-optimization/46309
      	* tree-ssa-reassoc.c (init_range_entry): Add STMT argument
      	and use it if EXP is NULL.
      	(update_range_test): Handle OPCODE equal to ERROR_MARK
      	and oe->op NULL.
      	(optimize_range_tests): Likewise.
      	(final_range_test_p, suitable_cond_bb, no_side_effect_bb, get_ops,
      	maybe_optimize_range_tests): New functions.
      	(reassociate_bb): Call maybe_optimize_range_tests if last
      	stmt of bb is GIMPLE_COND that hasn't been visited yet.
      
      	* gcc.dg/pr19105.c: New test.
      	* gcc.dg/pr21643.c: New test.
      	* gcc.dg/pr46309-2.c: New test.
      	* gcc.c-torture/execute/pr46309.c: New test.
      
      From-SVN: r193028
      Jakub Jelinek committed
    • rs6000.md (insvsi, [...]): Rename to... · c727fb67
      gcc/
      	* config/rs6000/rs6000.md (insvsi, insvdi, extvsi, extvdi): Rename to...
      	(insvsi_internal, insvdi_internal, extvsi_internal)
      	(extvdi_internal): ...this.
      	(insv, extv): Update accordingly.
      
      From-SVN: r193027
      Richard Sandiford committed
    • combine.c (simplify_comparison): If BITS_BIG_ENDIAN... · 7ae6664b
      gcc/
      	* combine.c (simplify_comparison): If BITS_BIG_ENDIAN, always assume
      	that zero_extracts of const_ints are doing word-sized extractions.
      
      From-SVN: r193026
      Richard Sandiford committed
    • combine.c (make_extraction): Remove dead wanted_inner_mode- and pos_rtx-related code. · 8e2326a2
      gcc/
      	* combine.c (make_extraction): Remove dead wanted_inner_mode-
      	and pos_rtx-related code.
      
      From-SVN: r193025
      Richard Sandiford committed
    • expmed.c (store_bit_field_1): Move generation of MEM insvs to the MEM_P block. · 17a73ba0
      gcc/
      	* expmed.c (store_bit_field_1): Move generation of MEM insvs
      	to the MEM_P block.
      	(extract_bit_field_1): Likewise extvs and extzvs.
      
      From-SVN: r193024
      Richard Sandiford committed
    • expmed.c (store_bit_field_using_insv): New function, split out from... · a20556e4
      gcc/
      	* expmed.c (store_bit_field_using_insv): New function,
      	split out from...
      	(store_bit_field_1): ...here.
      	(extract_bit_field_using_extv): New function, split out from...
      	(extract_bit_field_1): ...here.
      
      From-SVN: r193023
      Richard Sandiford committed
    • expmed.c (store_bit_field_1): Use OP_MODE to check whether an insv pattern is available. · 94eba7a8
      gcc/
      	* expmed.c (store_bit_field_1): Use OP_MODE to check whether an
      	insv pattern is available.  Remove redundant checks for OP_MODE
      	being MAX_MACHINE_MODE.
      	(extract_bit_field_1): Remove redundant checks for EXT_MODE being
      	MAX_MACHINE_MODE.
      
      From-SVN: r193022
      Richard Sandiford committed
    • expmed.c (store_bit_field_1): Remove test for BLKmode values. · 7682c22c
      gcc/
      	* expmed.c (store_bit_field_1): Remove test for BLKmode values.
      
      From-SVN: r193021
      Richard Sandiford committed
    • t-rtems: New (Custom multilibs). · f5bb22c8
      2012-10-31  Ralf Corsépius  <ralf.corsepius@rtems.org>,
      	    Joel Sherrill  <joel.sherrill@oarcorp.com>
      
      	* config/sparc/t-rtems: New (Custom multilibs).
      	* config/sparc/t-rtems-64: New (Custom multilibs).
      	* config.gcc (sparc64-*-rtems*): Add sparc/t-rtems-64.
      	(sparc-*-rtems*): Add sparc/t-rtems.
      
      
      Co-Authored-By: Joel Sherrill <joel.sherrill@oarcorp.com>
      
      From-SVN: r193018
      Ralf Corsepius committed
    • Detect assembler support for RTM · 07d3b5c8
      	* acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
      	* configure.ac: Use it.
      	* config.h.in, configure: Rebuild.
      	* testsuite/Makefile.in: Rebuild.
      
      From-SVN: r193017
      Richard Henderson committed
    • rs6000.c (legitimize_reload_address): Remove code handling non-aligned ld/std. · d0a54439
      gcc/
      	* config/rs6000/rs6000.c (legitimize_reload_address): Remove code
      	handling non-aligned ld/std.
      	* config/rs6000/paired.md (movv2sf_paired): Use 'Y' instead of 'o'.
      	* config/rs6000/vsx.md (vsx_mov, vsx_movti): Likewise.
      	* config/rs6000/altivec.md (altivec_mov, altivec_movti): Likewise.
      	* config/rs6000/dfp.md (movtd_internal): Use 'm' instead of 'o'.
      gcc/testsuite/
      	* gcc.target/powerpc/dimode_off.c: New.
      	* gcc.target/powerpc/timode_off.c: New.
      	* gcc.target/powerpc/dfmode_off.c: New.
      	* gcc.target/powerpc/tfmode_off.c: New.
      
      From-SVN: r193016
      Alan Modra committed
    • linux64_closure.S: Add new ABI support. · 7054d980
      	* src/powerpc/linux64_closure.S: Add new ABI support.
      	* src/powerpc/linux64.S: Likewise.
      
      From-SVN: r193015
      Alan Modra committed
    • linux64.h (TARGET_OS_CPP_BUILTINS): Define _CALL_LINUX. · 6c10ab65
      	* config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Define _CALL_LINUX.
      
      From-SVN: r193014
      Alan Modra committed
    • re PR target/52498 (vmsdbgout.c fails to build with --enable-werror-always) · 2515a1e6
              PR target/52498
              * vmsdbgout.c (vmsdbgout_write_source_line): Comment out names of
              last two parameters.
      
      From-SVN: r193013
      Joern Rennecke committed
    • lra-constraints.c (choose_split_class): Add ATTRIBUTE_UNUSED to hard_reg_class. · ef4dbe49
              * lra-constraints.c (choose_split_class): Add ATTRIBUTE_UNUSED to
              hard_reg_class.
      
      From-SVN: r193012
      Joern Rennecke committed
    • config.host (m32r-*-rtems*): Include crtinit.o and crtfinit.o as extra_parts. · c1d4fa04
      2012-10-31  Joel Sherrill  <joel.sherrill@oarcorp.com>
      
      	* config.host (m32r-*-rtems*): Include crtinit.o and crtfinit.o
      	as extra_parts.
      
      From-SVN: r193010
      Joel Sherrill committed
    • forward_list.h (forward_list): Adjust comments. · b0b4a253
      	* include/bits/forward_list.h (forward_list): Adjust comments.
      	(forward_list(const forward_list&, const _Alloc&)): Use
      	_M_range_initialize to copy elements.
      	(forward_list(forward_list&&, const _Alloc&)): Add exception
      	specification.
      	(_Fwd_list_base(const _Fwd_list_base&, const _Node_alloc_type&)):
      	Remove.
      	* include/bits/forward_list.tcc (_Fwd_list_base(const _Fwd_list_base&,
      	const _Node_alloc_type&)): Remove.
      	(_Fwd_list_base(_Fwd_list_base&&, const _Node_alloc_type&)): Fix
      	memory leak when allocators are not equal.
      
      From-SVN: r193009
      Jonathan Wakely committed
    • compiler: Add -fgo-relative-import-path. · 4e1866fe
      	* lang.opt (-fgo-relative-import-path): New option.
      	* go-lang.c (go_relative_import_path): New static variable.
      	(go_langhook_init): Pass go_relative_import_path to
      	go_create_gogo.
      	(go_langhook_handle_option): Handle -fgo-relative-import-path.
      	* go-c.h (go_create_gogo): Update declaration.
      	* gccgo.texi (Invoking gccgo): Document
      	-fgo-relative-import-path.
      
      From-SVN: r193008
      Ian Lance Taylor committed