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 libstdc++/36801] config/cpu/generic/atomicity_mutex/atomicity.h incorrectly relies on global constructor ordering



------- Comment #4 from jifl-bugzilla at jifvik dot org  2008-07-12 01:53 -------
I can't really work out how to provide a testcase as such. To reproduce it all
I'm doing is:
#include <cstdio>
#include <iostream>
int
main(int argc, char *argv[])
{
    std::cout << "Hello world" << std::endl;
    return 0;
}

The actual error comes as a result of libstdc++'s interaction with the
surrounding environment when GCC is built with --enable-threads with my OS, and
what that means for the final linked executable running on an ARM board. So
short of giving you my OS and an ARM board I can't think of any way to
construct a piece of code that you can use in your environment to reproduce it.

I guess you're reluctant to try fixing a problem you can't see yourself, so in
that case I'll produce and test a patch, now that I know you're okay with the
__gthread_once approach. And I'll try to keep it as short as possible to avoid
needing to sort out a copyright assignment. In fact, I'll apply for a copyright
assignment now just in case anyway.

Hmm, seems I can't assign this bug to myself :-).


-- 


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


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