This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: failure to construct global object
> Fair enough. Let me try to change your mind.
Thanks for the update. From all your explanations, it looks like a
bug. Unfortunately, I cannot do anything more but acknowledging: "It
looks like a bug", since you did not provide source code so far.
> I have moved the global object into the object file which contains
> the main(). The program still runs without visiting the constructor
> for the class in question. I create another object of the same
> class, this time inside to scope of main(). Now the constructor is
> hit once.
Please perform the following steps: Compile the file containing main()
with 'g++ --save-temps -any-other-options-you-are-using
main.cpp'. Create a tar file containing main.ii and main.s, and
compress it appropriately. Send us the resulting tar file and the g++
command line you were using.
In case you have concerns sharing your code: I have no interest
whatsoever in misusing your code; I'm trying to track a bug in the
compiler. While sending the report to gcc-bugs (and hence to the
public) is in general preferred (and accepted by the majority of bug
reporters), sending it privately to me is also fine.
Regards,
Martin