[Bug libstdc++/30280] New: SIGSEGV on operator==(valarray<bool>, bool)

sebor at roguewave dot com gcc-bugzilla@gcc.gnu.org
Fri Dec 22 19:46:00 GMT 2006


The (strictly speaking ill-formed) program below successfully compiles with
gcc 4.1.0 but fails with a SIGSEGV at runtime. I think it should either fail
to compile or, if it compiles because of a gcc extension, it should also run
successfully to completion.

$ cat u.cpp && g++ u.cpp && ./a.out
#include <cassert>
#include <valarray>

int main ()
{
    std::valarray<bool> a (1);

    assert (a == false);
}

Segmentation Fault (core dumped)


-- 
           Summary: SIGSEGV on operator==(valarray<bool>, bool)
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com


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



More information about the Gcc-bugs mailing list