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
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
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
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 *
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/
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267
--- Comment #2 from David Keller 2012-08-15
02:58:33 UTC ---
1 #include
2 #include
3 #include
4
5
6 namespace detail {
7
8 inline void throw_error(const boost::system::error_code& err)
9 {
10 /**
11 * If this condi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267
--- Comment #1 from David Keller 2012-08-15
02:09:47 UTC ---
Err:
Pasted command line show use of -Os which does *NOT* reproduce the behavior.
Please use -O3.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267
Bug #: 54267
Summary: std::exception not catched when -O3 (-Os is fine, link
static, FreeBSD 9.0-RELEASE-p3)
Classification: Unclassified
Product: gcc
Version: 4.7.2