[Bug middle-end/48310] New: ask a question about expand_used_vars in cfgexpand.c

2011-03-27 Thread zgss278 at 163 dot com
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;

:
  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!


[Bug middle-end/48310] ask a question about expand_used_vars in cfgexpand.c

2011-03-28 Thread zgss278 at 163 dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48310

--- Comment #2 from shushengyu  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" 
wrote:
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48310
>
>Richard Guenther  changed:
>
>   What|Removed |Added
>
> Status|UNCONFIRMED |RESOLVED
> Resolution||INVALID
>
>--- Comment #1 from Richard Guenther  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.


[Bug middle-end/48310] ask a question about expand_used_vars in cfgexpand.c

2011-03-29 Thread zgss278 at 163 dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48310

--- Comment #3 from shushengyu  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!


[Bug c++/49126] New: timevar_stack faild because define_label

2011-05-23 Thread zgss278 at 163 dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49126

   Summary: timevar_stack faild because define_label
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zgss...@163.com


when source code like this,I think there is a bug:
int f()
{
goto cleanup:
}
then compiler will go along this path:
|tree poplevel (int keep, int reverse, int functionbody)
-->timevar_start (TV_NAME_LOOKUP);xxx
-->
--> pop_labels (block);
|static void pop_labels (tree block)
> htab_traverse (named_labels, pop_labels_1, block);
|static int pop_labels_1 (void **slot, void *data)
-->pop_label (ent->label_decl, NULL_TREE);
|static void pop_label (tree label, tree old_value)
> define_label (location, DECL_NAME (label));
|tree define_label (location_t location, tree name)
--> timevar_start (TV_NAME_LOOKUP);x
so at last in:
|void timevar_start (timevar_id_t timevar)
-->  gcc_assert (!tv->standalone);
failed!