public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/9234: [3.3/3.4 regression] unary minus for valarrays broken
@ 2003-02-02 20:16 Volker Reichelt
0 siblings, 0 replies; 4+ messages in thread
From: Volker Reichelt @ 2003-02-02 20:16 UTC (permalink / raw)
To: reichelt; +Cc: gcc-prs
The following reply was made to PR libstdc++/9234; it has been noted by GNATS.
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: paolo@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org, gdr@integrable-solutions.net, nobody@gcc.gnu.org,
gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/9234: [3.3/3.4 regression] unary minus for valarrays broken
Date: Sun, 2 Feb 2003 22:08:44 +0100
Hi Paolo,
On 2 Feb, paolo@gcc.gnu.org wrote:
> Volker, Gaby approved your patch (see PR 9235). Could you
> please commit it to both mainline and 3_3?
I'm going to this tomorrrow morning. I wanted to do this earlier,
but had trouble with the testsuite (I got a new computer and had
some configury to do).
In addition, I found another failure in valarray: operator!=() is
broken, too, because of the following cut-n-paste error:
struct __not_equal_to
{
template<typename _Tp>
bool operator()(const _Tp& __x, const _Tp& __y) const
{ return __x == __y; }
^^^^
};
I'll commit that (as obvious) and a testcase, too.
> FYI, now in mainline the relevant code belongs to valarray_before.h,
> ~ line 462.
I already noticed, but thanks for the hint, anyway.
Regards,
Volker
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9234
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/9234: [3.3/3.4 regression] unary minus for valarrays broken
@ 2003-02-03 10:56 reichelt
0 siblings, 0 replies; 4+ messages in thread
From: reichelt @ 2003-02-03 10:56 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, gdr, reichelt
Synopsis: [3.3/3.4 regression] unary minus for valarrays broken
State-Changed-From-To: analyzed->closed
State-Changed-By: reichelt
State-Changed-When: Mon Feb 3 10:56:42 2003
State-Changed-Why:
Fixed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9234
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/9234: [3.3/3.4 regression] unary minus for valarrays broken
@ 2003-02-02 9:35 paolo
0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2003-02-02 9:35 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, gdr, nobody, reichelt
Synopsis: [3.3/3.4 regression] unary minus for valarrays broken
Responsible-Changed-From-To: unassigned->reichelt
Responsible-Changed-By: paolo
Responsible-Changed-When: Sun Feb 2 09:35:17 2003
Responsible-Changed-Why:
Patch ready.
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Sun Feb 2 09:35:17 2003
State-Changed-Why:
Volker, Gaby approved your patch (see PR 9235). Could you
please commit it to both mainline and 3_3? FYI, now in
mainline the relevant code belongs to valarray_before.h,
~ line 462.
Thanks, Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9234
^ permalink raw reply [flat|nested] 4+ messages in thread
* libstdc++/9234: [3.3/3.4 regression] unary minus for valarrays broken
@ 2003-01-08 22:56 reichelt
0 siblings, 0 replies; 4+ messages in thread
From: reichelt @ 2003-01-08 22:56 UTC (permalink / raw)
To: gcc-gnats; +Cc: gdr
>Number: 9234
>Category: libstdc++
>Synopsis: [3.3/3.4 regression] unary minus for valarrays broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Wed Jan 08 14:56:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Volker Reichelt
>Release: 3.3-20021230, 3.4-20021230
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The following program should return -1, but returns 1 instead
(just compile with "g++ -c"):
-----------------------snip here------------------
#include<valarray>
int main ()
{
std::valarray<int> u(1);
u[0]=1;
return (-u)[0];
}
-----------------------snip here------------------
I think that Gaby's patch
http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00197.html
caused the regression, since the patch below fixes the
problem for me. (I didn't do a bootstrap or regression
tests, though.)
>How-To-Repeat:
g++ -c
>Fix:
===========================================================
--- gcc-old/libstdc++-v3/include/bits/valarray_meta.h Sat Jan 4 01:37:31 2003
+++ gcc-new/libstdc++-v3/include/bits/valarray_meta.h Wed Jan 8 23:26:44 2003
@@ -457,7 +457,7 @@ namespace std
_UnBase(const _Arg& __e) : _M_expr(__e) {}
value_type operator[](size_t __i) const
- { return _M_expr[__i]; }
+ { return _Oper() (_M_expr[__i]); }
size_t size() const { return _M_expr.size(); }
============================================================
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-03 10:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-02 20:16 libstdc++/9234: [3.3/3.4 regression] unary minus for valarrays broken Volker Reichelt
-- strict thread matches above, loose matches on Subject: below --
2003-02-03 10:56 reichelt
2003-02-02 9:35 paolo
2003-01-08 22:56 reichelt
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).