This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]