http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48310

           Summary: ask a question about expand_used_vars in cfgexpand.c
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zgss...@163.com


Hello!
I am using the gcc to implemnt may compiler.My way is integrate the gcc source
to my windows VC project,from configurs to the other.
I want to thanks the Gcc group here!
But now I encounter a problem and cannot solve it,though I tryed some days,so I
resort to you.
The problem is that the assert fail:
for (i = 0; i < SA.map->m_num_partitions; i++)
    {
        LPTREE var = SSA_NAME_VAR (SA.map->partition_to_var ( i));
        if (TREE_CODE (var) != VAR_DECL && !SA.partition_to_pseudo[i])
            SA.partition_to_pseudo[i] = DECL_RTL_IF_SET (var);
                gcc_assert (SA.partition_to_pseudo[i]);//problemt is here
=============================================
the sourec code(equal to C) is
int f(int p)
{
  int x = 3;
  return x;
}
and the gimple is 
int f(int) (int p)
{
  int D.1702;
  int x;

  D.1702 = x;
  return D.1702;
}
and the optimized is
int f(int) (int p)
{
 int x;
 int D.1702;

<bb 2>:
  D.1702_2 = x_1(D);
  return D.1702_2;
}
    For the problem,according to my debug on VC,I found there  two VAR_DECL
through the expand_used_vars, then one will throught expand_one_stack_var
(var),and the one wiil through expand_one_hard_reg_var.And last both will bei
set_rtl (decl, x),ans is not the SA.partition_to_pseudo[i ]= ....

   So SA.partition_to_pseudo[i] can't be filled and the assert failed.

   I think there must some missing or uncomplete in my project,i update my
project partly by the gcc trunk. Can you help me to diagnost this problem and
give me some hint. That's all right!

Reply via email to