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/33992] [4.3 Regression] profiledbootstrap is broken (miscompiling a function with inlining)



------- Comment #24 from ubizjak at gmail dot com  2008-02-09 21:04 -------
Created an attachment (id=15125)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15125&action=view)
Shorter and more evil testcase

This is much shorter testcase that basically consists of two functions,
do_test() and do_add() in addition to a couple of realnum handling functions. 

The test however exposes more problems.

We still have:
[uros@localhost test]$ gcc -O2 t1.c
[uros@localhost test]$ ./a.out
[uros@localhost test]$ gcc -O2 -DINLINE t1.c
[uros@localhost test]$ ./a.out
Aborted

There is new problem exposed:

As can be seen in the testcase, there is a call to normalize() in do_add()
function. Since we call do_add() with arg *a of rvc_zero and arg *b of
rvc_normal class of numbers, this call is effectively a dead code.

However, when the call to normalize() is removed, the test always fail, no
matter if normalize is forced to be inlined or not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33992


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