[Bug target/54267] std::exception not catched when -O3 (-Os is fine, link static, FreeBSD 9.0-RELEASE-p3)

2012-08-15 Thread david.keller at litchis dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 --- Comment #8 from David Keller 2012-08-15 15:55:16 UTC --- According to http://www.freebsd.org/cgi/query-pr.cgi?pr=28191, the man is wrong, FreeBSD look at LD_LIBRARY_PATH before rpath. So, when LD_LIBRARY_PATH contains /lib:, it crashes as se

[Bug target/54267] std::exception not catched when -O3 (-Os is fine, link static, FreeBSD 9.0-RELEASE-p3)

2012-08-14 Thread david.keller at litchis dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 --- Comment #7 from David Keller 2012-08-15 03:39:56 UTC --- It might be related to a wrong stdlib selection on my side: 1) Without setenv LD_LIBRARY_PATH /lib:/usr/local/bin:/usr/local/lib:/usr/local/lib32:/usr/local/lib64, the program runs fin

[Bug target/54267] std::exception not catched when -O3 (-Os is fine, link static, FreeBSD 9.0-RELEASE-p3)

2012-08-14 Thread david.keller at litchis dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 --- Comment #6 from David Keller 2012-08-15 03:34:07 UTC --- Created attachment 28018 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28018 Here is the faulty code. # Hum, without this variable, the program runs fine. # Is it finding the wro

[Bug target/54267] std::exception not catched when -O3 (-Os is fine, link static, FreeBSD 9.0-RELEASE-p3)

2012-08-14 Thread david.keller at litchis dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 --- Comment #5 from David Keller 2012-08-15 03:16:30 UTC --- 1 #include 2 #include 3 4 namespace detail { 5 6 inline void throw_error(bool t) 7 { 8 /** 9 * If this condition is removed, (i.e. always throw) 10 *

[Bug target/54267] std::exception not catched when -O3 (-Os is fine, link static, FreeBSD 9.0-RELEASE-p3)

2012-08-14 Thread david.keller at litchis dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 --- Comment #4 from David Keller 2012-08-15 03:05:29 UTC --- I'am trying. It's not reproducible with classes. Static build seems to use shared libgcc_s: $ldd bin/gcc-4.7/release/link-static/threading-multi/main bin/gcc-4.7/release/link-static/

[Bug target/54267] std::exception not catched when -O3 (-Os is fine, link static, FreeBSD 9.0-RELEASE-p3)

2012-08-14 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 Andrew Pinski changed: What|Removed |Added Target|x64 |x68_64-freebsd* Component|c++