Benchmark is failing at runtime, emitting following message at the end before exiting with rc=1. ** Event #0 T=0.0000000 ( 0.00s) Messages: created: 77472 ** Event #5000000 T=0.0868274600 ( 86ms) Messages: created: 3949482 ** Event #10000000 T=0.1605411650 (160ms) Messages: created: 7854099 <!> Error in module largeNet.llanBB[48].bhost[3].mac: (cQueue)largeNet.llanBB[48].bhost[3].mac.class-members.outputBuffer: pop(): queue empty. End run of OMNeT++
Does adding -fno-lifetime-dse help? This could be a bug in the omnetpp sources ...
(In reply to Andrew Pinski from comment #1) > Does adding -fno-lifetime-dse help? This could be a bug in the omnetpp > sources ... Nope, still fails. 471.omnetpp: copy 0 non-zero return code (exit code=1, signal=0)
Benchmark fails same way with no optimization.
This also happens on s390x, even with -O0 and no new -march setting. The following line in EtherMac.cc delete outputbuffer.pop() actually emits two calls to cQueue::pop (). On the second call, the queue is empty and the program terminates. Already in the .original pass, a SAVE_EXPR that was there before is not present anymore: if (SAVE_EXPR <cQueue::pop [..] vs. if (cQueue::pop [..] r259771 removes two checks like this: - if (TREE_SIDE_EFFECTS (addr)) - addr = save_expr (addr); Are they really redundant?
Also failed on x86: https://gcc.gnu.org/ml/gcc-testresults/2018-05/msg00217.html
This hunk causes the double pop(): @@ -4650,8 +4648,6 @@ build_delete (tree otype, tree addr, special_function_kind auto_delete, } } } - if (TREE_SIDE_EFFECTS (addr)) - addr = save_expr (addr); /* Throw away const and volatile on target type of addr. */ addr = convert_force (build_pointer_type (type), addr, 0, complain); addr has the side-effects bit set at that point.
Also failing on aarch64 targets.
Fixed.
Author: jason Date: Thu May 3 23:35:20 2018 New Revision: 259913 URL: https://gcc.gnu.org/viewcvs?rev=259913&root=gcc&view=rev Log: PR c++/85600 - virtual delete failure. * init.c (build_delete): Always save_expr when deleting. Added: trunk/gcc/testsuite/g++.dg/expr/delete2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/init.c