This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48761] New: Indirect inlining needs to perform type checking
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Apr 2011 15:47:59 +0000
- Subject: [Bug middle-end/48761] New: Indirect inlining needs to perform type checking
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48761
Summary: Indirect inlining needs to perform type checking
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hubicka@gcc.gnu.org
Hi,
I believe that the following bug is not preventing Mozilla from building with
LTO. Though I did not reduced the testcase, yet, I can easily reproduce similar
bug. I will still look into Mozilla testcase as I can not imagine this to match
on any sane code.
Martin/Richi, at some point we need to test type compatibility after declaring
edge direct and possible set the uninlinable flag. Bit tricky to do as the
call type is not easily accessible from the indirect edge.
Honza
evans:/abuild/jh/trunk-3/build-inst5/gcc/:[1]$ cat ~/t.c
struct a{
double b;
};
double a(struct a b)
{
return b.b;
}
callptr(int (*p)(int))
{
p(10);
}
main()
{
callptr (a);
}
evans:/abuild/jh/trunk-3/build-inst5/gcc/:[0]$ ./xgcc -B ./ -O3 ~/t.c
-fno-early-inlining -S
/root/t.c: In function 'main':
/root/t.c:15:3: warning: passing argument 1 of 'callptr' from incompatible
pointer type [enabled by default]
/root/t.c:9:1: note: expected 'int (*)(int)' but argument is of type 'double
(*)(struct a)'
/root/t.c:13:1: error: conversion of register to a different size
VIEW_CONVERT_EXPR<struct a>(D.2717_2);
# .MEM_4 = VDEF <.MEM_1(D)>
b = VIEW_CONVERT_EXPR<struct a>(D.2717_2);
/root/t.c:13:1: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.