public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* More problems with operands
@ 2004-09-04 16:51 Richard Kenner
  0 siblings, 0 replies; only message in thread
From: Richard Kenner @ 2004-09-04 16:51 UTC (permalink / raw)
  To: gcc

I "fixed" that problem locally with the patch below.  Then I get:

../../xgcc -B../../ -c -g -O2      -W -Wall -gnatpg  g-exctra.adb -o g-exctra.o
g-exctra.adb: In function `GNAT.EXCEPTION_TRACES.DECORATOR_WRAPPER':
g-exctra.adb:69: error: Found a virtual definition for a GIMPLE register
while verifying SSA_NAME decorator_traceback_35 in statement
#   gnat__exception_traces__current_decorator<D449>_29 = V_MAY_DEF <gnat__except
ion_traces__current_decorator<D449>_18>;
#   T.9<D466>_34 = V_MAY_DEF <T.9<D466>_23>;
#   decorator_traceback<D456>_35 = V_MAY_DEF <decorator_traceback<D456>_17>;
#   T.11<D468>_30 = V_MAY_DEF <T.11<D468>_28>;
#   VUSE <T.8<D465>_27>;
T.11<D468> = gnat__exception_traces__current_decorator.7_19 (T.8<D465>);

Those virtual definitions are due to a TMT being call-clobbered.
tree-ssa.texi strongly implies in its example that this is valid, but the
checker says it isn't.  So I'm confused.

This seemed to start failing with some change in the last 24 hours.

Here's how I worked around the last problem:

*** tree-ssa-operands.c	4 Sep 2004 03:26:58 -0000	2.34
--- tree-ssa-operands.c	4 Sep 2004 15:07:17 -0000
*************** get_asm_expr_operands (tree stmt)
*** 1269,1274 ****
  	  EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
  	      {
! 		tree var = referenced_var (i);
! 		add_stmt_operand (&var, stmt, opf_is_def);
  	      });
  
--- 1269,1274 ----
  	  EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
  	      {
! 		tree *var_p = &referenced_var (i);
! 		add_stmt_operand (var_p, stmt, opf_is_def);
  	      });
  
*************** get_asm_expr_operands (tree stmt)
*** 1276,1281 ****
  	EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, i,
  	    {
! 	      tree var = referenced_var (i);
! 	      add_stmt_operand (&var, stmt, opf_is_def);
  	    });
  
--- 1276,1281 ----
  	EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, i,
  	    {
! 	      tree *var_p = &referenced_var (i);
! 	      add_stmt_operand (var_p, stmt, opf_is_def);
  	    });
  
*************** add_call_clobber_ops (tree stmt)
*** 1597,1608 ****
        EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
  	{
! 	  tree var = referenced_var (i);
  
! 	  /* If VAR is read-only, don't add a V_MAY_DEF, just a 
  	     VUSE operand.  */
! 	  if (!TREE_READONLY (var))
! 	    add_stmt_operand (&var, stmt, opf_is_def);
  	  else
! 	    add_stmt_operand (&var, stmt, opf_none);
  	});
      }
--- 1597,1608 ----
        EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
  	{
! 	  tree *var_p = &referenced_var (i);
  
! 	  /* If &VAR_P is read-only, don't add a V_MAY_DEF, just a 
  	     VUSE operand.  */
! 	  if (!TREE_READONLY (*var_p))
! 	    add_stmt_operand (var_p, stmt, opf_is_def);
  	  else
! 	    add_stmt_operand (var_p, stmt, opf_none);
  	});
      }
*************** add_call_read_ops (tree stmt)
*** 1628,1633 ****
        EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
  	{
! 	  tree var = referenced_var (i);
! 	  add_stmt_operand (&var, stmt, opf_none);
  	});
      }
--- 1628,1633 ----
        EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
  	{
! 	  tree *var_p = &referenced_var (i);
! 	  add_stmt_operand (var_p, stmt, opf_none);
  	});
      }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-04 16:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-04 16:51 More problems with operands Richard Kenner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).