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 middle-end/48761] New: Indirect inlining needs to perform type checking


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.


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