[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-04 Thread olh at suse dot de

--- Additional Comments From olh at suse dot de  2005-03-04 13:30 ---
thanks Jakub, this patch fixes bootstrap for me.
tested on mainline and gcc-4_0-branch.


-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-04 Thread jakub at gcc dot gnu dot org

--- Additional Comments From jakub at gcc dot gnu dot org  2005-03-04 09:07 
---
Created an attachment (id=8326)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8326&action=view)
Patch I'm testing


-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread jakub at gcc dot gnu dot org

--- Additional Comments From jakub at gcc dot gnu dot org  2005-03-04 00:29 
---
I'm not sure if it is actually a bug in the compiler that compiles macro.c
or in libcpp.c.
The code in question is:
   cpp_token *token = _cpp_temp_token (pfile);
   token->type = (*paste_flag)->type;
   token->val.str = (*paste_flag)->val.str;
where val is a union of 2 pointers and struct cpp_string that has an uint,
4 bytes of padding and a pointer.
The difference between non-working and working libcpp is (as shown e.g. in
the assembly below) that the working one for the
token->val.str = (*paste_flag)->val.str;
assignment copies 16 bytes, i.e. len, 4 bytes of padding and text pointer,
while the non-working one copies only 4 bytes of val.str.len and 8 bytes
containing the val.str.text pointer, but not the padding.

Not sure why the uninitialized bits in the padding matter though, but apparently
they do.

-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread jakub at gcc dot gnu dot org

--- Additional Comments From jakub at gcc dot gnu dot org  2005-03-04 00:01 
---
Assembly diff between bad and good:
diff -pU6 macro1.s.{broken,good}
--- macro1.s.broken 2005-03-03 19:00:26.0 -0500
+++ macro1.s.good   2005-03-03 19:00:15.0 -0500
@@ -159,14 +159,13 @@ replace_args2:
lg  %r2,160(%r15)
tm  0(%r10),8
lg  %r1,0(%r2)
mvc 4(1,%r3),4(%r1)
lg  %r1,160(%r15)
lg  %r2,0(%r1)
-   mvc 8(4,%r3),8(%r2)
-   mvc 16(8,%r3),16(%r2)
+   mvc 8(16,%r3),8(%r2)
je  .L56
lg  %r2,0(%r1)
ic  %r1,5(%r2)
oill%r1,8
stc %r1,5(%r3)
 .L58:
@@ -406,15 +405,14 @@ cpp_get_token:
j   .L99
 .L105:
lgr %r2,%r11
brasl   %r14,_cpp_temp_token
ic  %r1,5(%r12)
oill%r1,32
-   mvc 8(4,%r2),8(%r12)
+   mvc 8(16,%r2),8(%r12)
mvc 4(1,%r2),4(%r12)
-   mvc 16(8,%r2),16(%r12)
stc %r1,5(%r2)
lgr %r12,%r2
lgr %r2,%r12
lg  %r4,272(%r15)
lmg %r11,%r15,248(%r15)
br  %r4


-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread jakub at gcc dot gnu dot org

--- Additional Comments From jakub at gcc dot gnu dot org  2005-03-03 23:57 
---
Created an attachment (id=8323)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8323&action=view)
The 2 routines

Yes, it does.  Attaching the 2 routines which are miscompiled on s390x
at -O2.

-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-03 
23:32 ---
Adding Jakub to the CC so he does not miss the updates from this bug since this 
and PR 20305 look to 
be the one and same bug really.  Also note olh, has identified the patch which 
caused it for PPC64, 
Jakub, you might want to see if reverting the patch which olh found, also fixes 
the s390x problem.

-- 
   What|Removed |Added

 CC||jakub at gcc dot gnu dot org


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread olh at suse dot de

--- Additional Comments From olh at suse dot de  2005-03-03 23:31 ---
the change above allowed a bootstrap of gcc-4.0.0-20050228 with itself.


-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread olh at suse dot de

--- Additional Comments From olh at suse dot de  2005-03-03 23:17 ---
After this patch, gcc could not boostrap itself anymore:

TZ=UTC cvs diff -pu -D '20041031 09:00' -D '20041031 10:00' gcc/

I'm testing this patch currently on mainline:

Index: gcc/ChangeLog.12
===
RCS file: /tmp/gcc-cvs/gcc/gcc/ChangeLog.12,v
retrieving revision 2.2
diff -u -p -p -u -r2.2 ChangeLog.12
--- gcc/ChangeLog.1218 Jan 2005 13:42:43 -  2.2
+++ gcc/ChangeLog.123 Mar 2005 22:57:01 -
@@ -6837,12 +6837,6 @@
 
* c-common.c: Fix a comment typo.
 
-2004-10-31  Jason Merrill  <[EMAIL PROTECTED]>
-
-   PR middle-end/17526
-   * tree-gimple.c (is_gimple_mem_rhs): Also require a val for
-   aggregate types that are not BLKmode.
-
 2004-10-30  Ziemowit Laski  <[EMAIL PROTECTED]>
 
* c-common.h (objc_lookup_ivar): Add second parameter to
Index: gcc/tree-gimple.c
===
RCS file: /tmp/gcc-cvs/gcc/gcc/tree-gimple.c,v
retrieving revision 2.35
diff -u -p -p -u -r2.35 tree-gimple.c
--- gcc/tree-gimple.c   14 Dec 2004 13:41:52 -  2.35
+++ gcc/tree-gimple.c   3 Mar 2005 22:57:25 -
@@ -111,12 +111,9 @@ is_gimple_reg_rhs (tree t)
 bool
 is_gimple_mem_rhs (tree t)
 {
-  /* If we're dealing with a renamable type, either source or dest must be
- a renamed variable.  Also force a temporary if the type doesn't need
- to be stored in memory, since it's cheap and prevents erroneous
- tailcalls (PR 17526).  */
-  if (is_gimple_reg_type (TREE_TYPE (t))
-  || TYPE_MODE (TREE_TYPE (t)) != BLKmode)
+  /* If we're dealing with a renamable type, either source or dest
+ must be a renamed variable.  */
+  if (is_gimple_reg_type (TREE_TYPE (t)))
 return is_gimple_val (t);
   else
 return is_gimple_formal_tmp_rhs (t);




-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   Keywords||build


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-03 
19:24 ---
PR 20305 is the bootstrap failure for s390x and it looks like the same problem.

-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

OtherBugsDependingO||20305
  nThis||


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-03 Thread olh at suse dot de

--- Additional Comments From olh at suse dot de  2005-03-03 14:48 ---
the breakage appeared between 20041027 and 20041101.


-- 


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


[Bug bootstrap/20282] [4.0/4.1 Regression] gcc4 can not bootstrap itself anymore

2005-03-02 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Keywords||ice-on-valid-code, rejects-
   ||valid, wrong-code
Summary|gcc4 can not bootstrap  |[4.0/4.1 Regression] gcc4
   |itself anymore  |can not bootstrap itself
   ||anymore
   Target Milestone|--- |4.0.0


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