public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48310] New: ask a question about expand_used_vars in cfgexpand.c
@ 2011-03-28  7:47 zgss278 at 163 dot com
  2011-03-28  9:58 ` [Bug middle-end/48310] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zgss278 at 163 dot com @ 2011-03-28  7:47 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: zgss278@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!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/48310] ask a question about expand_used_vars in cfgexpand.c
  2011-03-28  7:47 [Bug middle-end/48310] New: ask a question about expand_used_vars in cfgexpand.c zgss278 at 163 dot com
@ 2011-03-28  9:58 ` rguenth at gcc dot gnu.org
  2011-03-28 11:27 ` zgss278 at 163 dot com
  2011-03-30  6:19 ` zgss278 at 163 dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-28  9:58 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-28 09:47:01 UTC ---
Please ask questions on the GCC mailinglists, not via bugzilla.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/48310] ask a question about expand_used_vars in cfgexpand.c
  2011-03-28  7:47 [Bug middle-end/48310] New: ask a question about expand_used_vars in cfgexpand.c zgss278 at 163 dot com
  2011-03-28  9:58 ` [Bug middle-end/48310] " rguenth at gcc dot gnu.org
@ 2011-03-28 11:27 ` zgss278 at 163 dot com
  2011-03-30  6:19 ` zgss278 at 163 dot com
  2 siblings, 0 replies; 4+ messages in thread
From: zgss278 at 163 dot com @ 2011-03-28 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from shushengyu <zgss278 at 163 dot com> 2011-03-28 11:20:03 UTC ---
Oh,sorry!I am not know the rule well.
Can you introduce someone who would like to give me some help to me?
At 2011-03-28 17:47:06,"rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
wrote:
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48310
>
>Richard Guenther <rguenth at gcc dot gnu.org> changed:
>
>           What    |Removed                     |Added
>----------------------------------------------------------------------------
>             Status|UNCONFIRMED                 |RESOLVED
>         Resolution|                            |INVALID
>
>--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-28 09:47:01 UTC ---
>Please ask questions on the GCC mailinglists, not via bugzilla.
>
>-- 
>Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
>------- You are receiving this mail because: -------
>You reported the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/48310] ask a question about expand_used_vars in cfgexpand.c
  2011-03-28  7:47 [Bug middle-end/48310] New: ask a question about expand_used_vars in cfgexpand.c zgss278 at 163 dot com
  2011-03-28  9:58 ` [Bug middle-end/48310] " rguenth at gcc dot gnu.org
  2011-03-28 11:27 ` zgss278 at 163 dot com
@ 2011-03-30  6:19 ` zgss278 at 163 dot com
  2 siblings, 0 replies; 4+ messages in thread
From: zgss278 at 163 dot com @ 2011-03-30  6:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from shushengyu <zgss278 at 163 dot com> 2011-03-30 04:07:33 UTC ---
I just compare the code in my project  and the code in trunk ,found that the
new code in three place used "origvar":
  if (really_expand)
        expand_one_register_var (origvar);
=============
    }
  else if (defer_stack_allocation (var, toplevel))
    add_stack_var (origvar);
  else
    {
      if (really_expand)
        expand_one_stack_var (origvar);
=========
but I have not update same,so my program failed.
oh,what is a silly.
sorry agaig bothering! I won't do this fault again.
After Some moths ,I will complet my compiler for my language based on gcc.
Gcc is too great!


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-30  4:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-28  7:47 [Bug middle-end/48310] New: ask a question about expand_used_vars in cfgexpand.c zgss278 at 163 dot com
2011-03-28  9:58 ` [Bug middle-end/48310] " rguenth at gcc dot gnu.org
2011-03-28 11:27 ` zgss278 at 163 dot com
2011-03-30  6:19 ` zgss278 at 163 dot com

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).