This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/42528] ICE with -flto and -fsigned-char
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2010 17:31:04 -0000
- Subject: [Bug lto/42528] ICE with -flto and -fsigned-char
- References: <bug-42528-8090@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-01-03 17:31 -------
The same problem exists for builtin functions that return or take arguments
of type char *. They change signature according to -f[un]signed-char which
causes for example
FAIL: gcc.c-torture/execute/builtins/strcpy-chk.c compilation, -O2 -flto
(internal compiler error)
when running with -funsigned-char on x86:
char p[32] = "";
int main ()
{
if (__builtin___strcpy_chk (p + 1, "vwxyz",
__builtin_object_size (p + 1, 0)) != p + 1)
__builtin_abort ();
return 0;
}
$ /obj/trunk-g/gcc/xgcc -B/obj/trunk-g/gcc/ strcpy-chk.3.i -O -flto
-funsigned-char
In file included from :0:0:
strcpy-chk.3.i: In function 'main':
strcpy-chk.3.i:2:5: error: non-trivial conversion at assignment
<unnamed-unsigned:8> *
<unnamed-signed:8> *
D.2023_3 = D.2027_5;
strcpy-chk.3.i:2:5: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42528