------- Comment #4 from dje at gcc dot gnu dot org 2009-12-09 16:36 ------- I think the problem is bad design of MPFR, not a bug in MPC. GCC uses mpfr_clear_flags(), mpfr_overflow_p() and mpfr_underflow_p() for results of computations in both MPFR and MPC, which uses MPFR. These rely on the MPFR global variable __gmpfr_flags. If libmpfr is a static library and libmpc is a shared library, libmpc and GCC will have their own, private copies of __gmpfr_flags. If both libraries are static or both libraries are shared, only one copy of the variable should exist. There sometimes are reasons to have both shared and static libraries and the current interaction creates a hidden dependency between the libraries.
I think it would be a much better design to associate the flag with the variable containing the computational result than some global state. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41035