Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 38107 invoked from network); 25 Sep 2007 23:00:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Sep 2007 23:00:13 -0000 Received: (qmail 51751 invoked by uid 500); 25 Sep 2007 23:00:03 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 51717 invoked by uid 500); 25 Sep 2007 23:00:03 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 51427 invoked by uid 99); 25 Sep 2007 23:00:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2007 16:00:02 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2007 23:00:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3CD13714209 for ; Tue, 25 Sep 2007 15:59:51 -0700 (PDT) Message-ID: <30944754.1190761191246.JavaMail.jira@brutus> Date: Tue, 25 Sep 2007 15:59:51 -0700 (PDT) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Updated: (STDCXX-315) std::valarray transcendentals use uninitialized storage In-Reply-To: <24347630.1168030527691.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor updated STDCXX-315: -------------------------------- Severity: Runtime Error Priority: Minor (was: Major) Affects Version/s: 4.1.4 The Rogue Wave 4.1.4 was affected as well. Lowered Priority to Minor since the standard doesn't specify the behavior of std::valarray for user-defined types. > std::valarray transcendentals use uninitialized storage > ------------------------------------------------------- > > Key: STDCXX-315 > URL: https://issues.apache.org/jira/browse/STDCXX-315 > Project: C++ Standard Library > Issue Type: Bug > Components: 26. Numerics > Affects Versions: 4.1.2, 4.1.3, 4.1.4 > Environment: all > Reporter: Martin Sebor > Assignee: Martin Sebor > Priority: Minor > Fix For: 4.2 > > > The program below is expected to produce no output. When compiled with the latest trunk it produces output indicating that the valarray transcendental functions use uninitialized storage. > $ cat t.cpp && make t && ./t > #include > #include > bool pass = true; > struct S { > const S* const self; > S (): self (this) { } > S (const S &s): self (this) { pass = pass && &s == s.self; } > S (double): self (this) { } > ~S () { pass = pass && this == self; } > operator double () const { pass = pass && this == self; return 1.0; } > void operator=(const S &s) const { > pass = pass && &s == s.self && this == self; > } > S operator- () const { pass = pass && this == self; return *this; } > bool operator< (const S &s) const { > pass = pass && &s == s.self && this == self; > return false; > } > }; > int main () > { > const S s; > const std::valarray a (2); > #define TEST(fun, args) \ > pass = true; \ > fun args; \ > if (!pass) \ > std::fprintf (stderr, "std::%s uses uninitialized storage\n", #fun) > TEST (abs, (a)); > TEST (acos, (a)); > TEST (asin, (a)); > TEST (atan, (a)); > TEST (atan2, (a, a)); > TEST (atan2, (a, s)); > TEST (atan2, (s, a)); > TEST (cos, (a)); > TEST (cosh, (a)); > TEST (exp, (a)); > TEST (log, (a)); > TEST (log10, (a)); > TEST (pow, (a, a)); > TEST (pow, (a, s)); > TEST (pow, (s, a)); > TEST (sin, (a)); > TEST (sinh, (a)); > TEST (sqrt, (a)); > TEST (tan, (a)); > TEST (tanh, (a)); > } > gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/gcc-4.1.0-11s/include -I/build/sebor/dev/stdlib/examples/include -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long t.cpp > gcc t.o -o t -L/build/sebor/gcc-4.1.0-11s/lib -lstd11s -lsupc++ -lm > std::abs uses uninitialized storage > std::acos uses uninitialized storage > std::asin uses uninitialized storage > std::atan uses uninitialized storage > std::atan2 uses uninitialized storage > std::atan2 uses uninitialized storage > std::atan2 uses uninitialized storage > std::cos uses uninitialized storage > std::cosh uses uninitialized storage > std::exp uses uninitialized storage > std::log uses uninitialized storage > std::log10 uses uninitialized storage > std::pow uses uninitialized storage > std::pow uses uninitialized storage > std::pow uses uninitialized storage > std::sin uses uninitialized storage > std::sinh uses uninitialized storage > std::sqrt uses uninitialized storage > std::tan uses uninitialized storage > std::tanh uses uninitialized storage -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.