This is the mail archive of the gcc-regression@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1 new GCC HEAD@193051 regression


With your recent patch, GCC HEAD revision 193051 had problems on:
native: regress-11 (1 NEW failures)
The previous build was of revision 193046.

Regressions for native:
old   g++.sum g++.dg/other/anon5.C
old   g++.sum g++.dg/torture/pr46154.C
old   gcc.sum gcc.c-torture/compile/20080806-1.c
NEW   gcc.sum gcc.c-torture/compile/pr44119.c
old   gcc.sum gcc.dg/attr-weakref-1.c
old   gcc.sum gcc.dg/builtin-object-size-8.c
fixed gcc.sum gcc.dg/pr44974.c
old   gcc.sum gcc.dg/torture/tls/thr-init-1.c
old   gcc.sum gcc.dg/torture/tls/thr-init-2.c
old   gcc.sum gcc.dg/torture/tls/tls-test.c
old   gcc.sum gcc.target/i386/pr44948-2a.c
old   gfortran.sum gfortran.dg/lto/pr45586

Log information for changes since the last build:
------------------------------------------------------------------------
r193047 | steven | 2012-10-31 14:37:10 -0700 (Wed, 31 Oct 2012) | 15 lines
Changed paths:
   M /trunk/gcc/ChangeLog
   M /trunk/gcc/basic-block.h
   M /trunk/gcc/cfganal.c
   M /trunk/gcc/dominance.c
   M /trunk/gcc/testsuite/ChangeLog
   A /trunk/gcc/testsuite/gcc.dg/torture/pr55018.c

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.


------------------------------------------------------------------------
r193048 | janus | 2012-10-31 14:55:50 -0700 (Wed, 31 Oct 2012) | 13 lines
Changed paths:
   M /trunk/gcc/fortran/ChangeLog
   M /trunk/gcc/fortran/trans-decl.c
   M /trunk/gcc/fortran/trans.h
   M /trunk/gcc/testsuite/ChangeLog
   A /trunk/gcc/testsuite/gfortran.dg/class_54.f90

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.

------------------------------------------------------------------------
r193049 | olegendo | 2012-10-31 15:05:40 -0700 (Wed, 31 Oct 2012) | 3 lines
Changed paths:
   M /trunk/gcc/ChangeLog
   M /trunk/gcc/testsuite/ChangeLog

	Fix PR number typo in ChangeLog.


------------------------------------------------------------------------
r193050 | hubicka | 2012-10-31 16:10:22 -0700 (Wed, 31 Oct 2012) | 2 lines
Changed paths:
   M /trunk/gcc/testsuite/ChangeLog
   M /trunk/gcc/testsuite/gcc.dg/pr44974.c

	* gcc.dg/pr44974.c: Add noinline.

------------------------------------------------------------------------
r193051 | crowl | 2012-10-31 16:15:10 -0700 (Wed, 31 Oct 2012) | 96 lines
Changed paths:
   M /trunk/gcc/ChangeLog
   M /trunk/gcc/Makefile.in
   M /trunk/gcc/ada/gcc-interface/utils.c
   M /trunk/gcc/cgraph.c
   M /trunk/gcc/cgraph.h
   M /trunk/gcc/cgraphbuild.c
   M /trunk/gcc/cgraphunit.c
   M /trunk/gcc/cp/decl2.c
   M /trunk/gcc/ipa-inline-analysis.c
   M /trunk/gcc/ipa-ref.c
   M /trunk/gcc/ipa-reference.c
   M /trunk/gcc/ipa.c
   A /trunk/gcc/is-a.h
   M /trunk/gcc/lto/lto-partition.c
   M /trunk/gcc/lto/lto.c
   M /trunk/gcc/lto-cgraph.c
   M /trunk/gcc/lto-streamer-out.c
   M /trunk/gcc/lto-streamer.h
   M /trunk/gcc/lto-symtab.c
   M /trunk/gcc/passes.c
   M /trunk/gcc/symtab.c
   M /trunk/gcc/tree-emutls.c
   M /trunk/gcc/varasm.c
   M /trunk/gcc/varpool.c

This patch implements generic type query and conversion functions,
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.


------------------------------------------------------------------------

For more information, see <http://glutton.geoffk.org/HEAD/>.

-- 
Geoffrey Keating <geoffk@geoffk.org> 
(via an automated GCC regression-testing script.)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]