[Bug tree-optimization/47413] Constant Propagation and Virtual Function Tables
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Sat Aug 19 11:08:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47413
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |law at redhat dot com
Resolution|--- |FIXED
--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
Fixed, not really sure when though:
int main() ()
{
struct obj * obj;
int _1;
;; basic block 2, loop depth 0, count 0, freq 10000, maybe hot
;; prev block 0, next block 3, flags: (NEW, REACHABLE, VISITED)
;; pred: ENTRY [100.0%] (FALLTHRU,EXECUTABLE)
obj_5 = malloc (8);
if (obj_5 == 0B)
goto <bb 4>; [30.86%]
else
goto <bb 3>; [69.14%]
;; succ: 4 [30.9%] (TRUE_VALUE,EXECUTABLE)
;; 3 [69.1%] (FALSE_VALUE,EXECUTABLE)
;; basic block 3, loop depth 0, count 0, freq 6914, maybe hot
;; prev block 2, next block 4, flags: (NEW, REACHABLE, VISITED)
;; pred: 2 [69.1%] (FALSE_VALUE,EXECUTABLE)
printf ("%d\n", 1337);
;; succ: 4 [100.0%] (FALLTHRU,EXECUTABLE)
;; basic block 4, loop depth 0, count 0, freq 10000, maybe hot
;; prev block 3, next block 1, flags: (NEW, REACHABLE, VISITED)
;; pred: 2 [30.9%] (TRUE_VALUE,EXECUTABLE)
;; 3 [100.0%] (FALLTHRU,EXECUTABLE)
# _1 = PHI <0(2), 1(3)>
return _1;
;; succ: EXIT [100.0%]
}
Note passing 1337 directly into the printf call.
More information about the Gcc-bugs
mailing list