#1653 complex functions segfault



many complex functions like exp, sin, sqrt crash on running:

#include <complex>
int main( int argc, char * argv[] )
std::complex< double > z( 0, 2 ) ;
std::exp( z ) ;
return 0 ;

Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.7.0/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --disable-build-poststage1-with-cxx --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.7.0 (GCC)

Best regards


  • Bjoern Thiel

    Bjoern Thiel - 2012-07-05
    • priority: 5 --> 7
  • Bjoern Thiel

    Bjoern Thiel - 2012-07-05

    GNU ld (GNU Binutils) 2.22

  • Earnie Boyd

    Earnie Boyd - 2012-07-05
    • priority: 7 --> 1
    • status: open --> pending
  • Earnie Boyd

    Earnie Boyd - 2012-07-05

    Have you updated your mingw runtime and w32api libraries?

    Since you modified the Priority setting I've reduced it to my lowest.

  • Bjoern Thiel

    Bjoern Thiel - 2012-07-09

    Dear Earnie,

    I think I'm reporting on the latest revision.

    By the way, what is 'priority' reflecting on - severity or mood?
    Or am I just too stupid to estimate?

    Best regards.

  • Bjoern Thiel

    Bjoern Thiel - 2012-07-09
    • priority: 1 --> 7
    • status: pending --> open
  • Earnie Boyd

    Earnie Boyd - 2012-07-09
    • priority: 7 --> 1
  • Earnie Boyd

    Earnie Boyd - 2012-07-09

    When you create the ticket there is a BIG RED WARNING:

    "If you are not a MinGW developer, changing the Status, Assigned To, Priority columns will only frustrate those who are and may cause unnecessary delay to your ticket.
    Do not report any bug, while classifying it as a "known bug"; if you do so, it may be assumed to be a duplicate, and could be deleted without further checking."

  • Earnie Boyd

    Earnie Boyd - 2012-07-09

    You didn't answer my question. The mingwrt and w32api packages needed to be rebuilt and the new releases are required to have a functioning 4.7.0. Have you updated them since they were released.

    You can check the files in /mingw/var/cache/mingw-get/packages/ You should have the following if you have the correct versions.


  • Keith Marshall

    Keith Marshall - 2012-07-09

    Isn't this a duplicate of bug #3536816, which the reporter has now designated as "fixed", by an upgrade to a properly consistent runtime release?

    Regarding priority assignment, this is not your prerogative. The big red warning, to which Earnie refers, tells you to leave it alone. All tickets start out at a base priority of five. My usual response to users who ignore the warning and attempt to escalate the priority by two, (as you did), is to take that delta from the original base priority, and apply it in the reverse direction, so escalation to seven becomes a reduction to three, (which then becomes the new base priority).

    You've now tried to escalate it again, this time by four points from my reference datum and six points from Earnie's, so I would be quite justified in now reducing it by those four or six points, to minus one or minus five, and, since both of these are now off the minimum priority scale, I would simply delete it, as invalid.

    On this occasion, I will leave it at the base priority of one, which Earnie has assigned, but if you try to escalate it again, you may bid it adieu.

  • Bjoern Thiel

    Bjoern Thiel - 2012-07-09

    I give up

  • Keith Marshall

    Keith Marshall - 2012-07-09

    You should not give up; (that's counter productive). You should:

    1) Leave us to assign priority; it is our prerogative, not yours.

    2) Answer the questions Earnie has asked, or at least confirm that you have addressed the issues of mingwrt and w32api installed versions, as he suggested, since we already know that a new release of mingwrt (at least) was required, to accommodate an ABI breaking change in GCC-4.7.

    As I noted previously, this appears to be a duplicate bug report, and upgrading mingwrt and w32api seems to have corrected the issue for the other reporter. Unless you confirm that you have installed the necessary upgrades, and they have NOT corrected the issue for you, then we have no reason to pursue this further, and we may as well close this ticket as a "fixed duplicate". OTOH, if you report that you have installed the proper upgrades, and the problem persists, then we would want to keep the ticket open, reverting to priority five, for further follow up action by our GCC maintainer.

    We appreciate your reporting of the bug, but we also rely on you to provide any requested follow up information, to help us resolve it. Precipitating an argument over assignment of priority doesn't facilitate that process.

  • Earnie Boyd

    Earnie Boyd - 2013-02-11
    • labels: gcc-4.7.0 --> gcc-4.7.0, gcc
    • status: open --> closed
    • milestone: --> OTHER
    • type: --> Support
    • resolution: --> works-for-me
    • category: --> No_User_Response
    • patch_attached: --> False