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

Reply via email to