From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 315 invoked by alias); 7 Sep 2004 11:45:00 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 32759 invoked from network); 7 Sep 2004 11:44:58 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sourceware.org with SMTP; 7 Sep 2004 11:44:58 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA24235; Tue, 7 Sep 04 07:47:53 EDT Date: Tue, 07 Sep 2004 11:45:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10409071147.AA24235@vlsi1.ultra.nyu.edu> To: dnovillo@redhat.com, rth@redhat.com Subject: Serious problems with tree-ssa operand handling Cc: gcc@gcc.gnu.org X-SW-Source: 2004-09/txt/msg00281.txt.bz2 I sent http://gcc.gnu.org/ml/gcc/2004-09/msg00189.html on Saturday because the breakage also happened on Friday. I've done more work here, which has left me more confused. See also http://gcc.gnu.org/ml/gcc/2004-09/msg00196.html The issue is the adding of virtual operands for a call. It uses alias information to do that and adds the operand with: tree var = referenced_var (i); add_stmt_operand (&var, ...); As I said originally, this puts a pointer into the stack of that function into the operands of the statement. That causes an access of junk when the operands are referenced. I tried fixing that with: tree *var_p = &referenced_var (i); add_stmt_operand (var_p, stmt, opf_is_def); That now references defined memory. But it has the problem that we then try to put an SSA_NAME into referenced_vars, which is wrong. Moreover, we get a verification error: 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_29 = V_MAY_DEF _18>; # T.9_34 = V_MAY_DEF _23>; # decorator_traceback_35 = V_MAY_DEF _17>; # T.11_30 = V_MAY_DEF _28>; # VUSE _27>; T.11 = gnat__exception_traces__current_decorator.7_19 (T.8); This is confusing because an example in doc/tree-ssa.texi implies this sort of thing is valid. I disabled that check and "fixed" the clobbering of referenced_vars by trying tree *var_p = (tree *) ggc_alloc (sizeof (tree *)); *var_p = referenced_var (i); add_stmt_operand (var_p, stmt, opf_is_def); Now I get another check failure, saying that a variable appears both as a real and virtual operand. When I disable *that* check, I finally get the Ada RTS to compile, but I get new ACATS failures (possibly related, but maybe not). But I shouldn't have to put in that kludge and disable both checks. Something looks very badly wrong here but I don't understand how this is supposed to work, so can't say what.