assert in constructor causes chaos

Samuel Krempp krempp@cmla.ens-cachan.fr
Wed Jul 11 15:43:00 GMT 2001


The bug was reproduced with the following g++ :
gcc version 3.1 20010624 (experimental)
gcc version 3.1 20010707 (experimental)
i686-pc-linux-gnu

and is not present in
gcc version 3.0 20010402 (Debian prerelease)

The code is fairly simple.
putting an assert in the constructor seems to cause the ctor to be called
twice (so the second time, it fails..)

Also, the bug disappears when the class is not a template.

hth,
-- 
Sam


More information about the Gcc-bugs mailing list