public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/5532: g++ segfaults when processing std::accumulate(begin, end, init, invalid_op)
@ 2002-01-29  7:36 mathias.hasselmann
  0 siblings, 0 replies; 2+ messages in thread
From: mathias.hasselmann @ 2002-01-29  7:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5532
>Category:       c++
>Synopsis:       g++ segfaults when processing std::accumulate(begin, end, init, invalid_op)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 29 07:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     mathias.hasselmann@gmx.de
>Release:        3.0.2
>Organization:
>Environment:
System: Linux dali.sqx.lde 2.4.9-mosix #17 SMP Sam Sep 1 03:04:51 CEST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /nfs/sam/opt/glibc/gcc-3.0.2/configure --prefix=/usr
>Description:
g++ segfaults when it has to processing std::accumulate(begin, end, init, invalid_op) where invalid_op is a invalid template reference.
>How-To-Repeat:
See the attachement for preprocessed code. Here comes the plain code:

$ cat accum.cc
#include<iostream>
#include<numeric>
#include<functional>

int main()
{
    int nums[] = { 1, 2, 3, 4, 5 };
    
    std::cout << std::accumulate(nums, nums + sizeof(nums)/sizeof(*nums),
                                 0, std::plus) << std::endl;
}
$ LC_ALL=C g++ -save-temps accum.cc 
accum.cc: In function `int main()':
accum.cc:10: Internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
$
>Fix:
no idea
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="accum.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="accum.cc"

I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPG51bWVyaWM+CiNpbmNsdWRlPGZ1bmN0aW9uYWw+
CgppbnQgbWFpbigpCnsKICAgIGludCBudW1zW10gPSB7IDEsIDIsIDMsIDQsIDUgfTsKICAgIAog
ICAgc3RkOjpjb3V0IDw8IHN0ZDo6YWNjdW11bGF0ZShudW1zLCBudW1zICsgc2l6ZW9mKG51bXMp
L3NpemVvZigqbnVtcyksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIHN0ZDo6
cGx1cykgPDwgc3RkOjplbmRsOwp9Cg==


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/5532: g++ segfaults when processing std::accumulate(begin, end, init, invalid_op)
@ 2002-01-30 19:03 rodrigc
  0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2002-01-30 19:03 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mathias.hasselmann, nobody

Synopsis: g++ segfaults when processing std::accumulate(begin, end, init, invalid_op)

State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Wed Jan 30 19:03:02 2002
State-Changed-Why:
    Duplicate of PR 5533.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5532


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-31  3:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-29  7:36 c++/5532: g++ segfaults when processing std::accumulate(begin, end, init, invalid_op) mathias.hasselmann
2002-01-30 19:03 rodrigc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).