public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18216] New: Different results when an array is statically/dynamically allocated
@ 2004-10-29 10:23 dkouroun at mailbox dot gr
  2004-10-29 10:25 ` [Bug c++/18216] " dkouroun at mailbox dot gr
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: dkouroun at mailbox dot gr @ 2004-10-29 10:23 UTC (permalink / raw)
  To: gcc-bugs

The README files in the tarball, show that when an array is declared 
double V[N]; 
or 
double* V = new double[N]; 
 
computations with values stored in that array give different results! 
Should floating point calculations with values stored in an array 
depend on the way that array has been allocated? Both g++-3.4.2  
and icc-8.1.022 exhibit similar behaviour with icc being both more  
accurate and much faster on a pentium4 Laptop.

-- 
           Summary: Different results when an array is
                    statically/dynamically allocated
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dkouroun at mailbox dot gr
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/18216] Different results when an array is statically/dynamically allocated
  2004-10-29 10:23 [Bug c++/18216] New: Different results when an array is statically/dynamically allocated dkouroun at mailbox dot gr
@ 2004-10-29 10:25 ` dkouroun at mailbox dot gr
  2004-10-29 11:36 ` [Bug target/18216] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: dkouroun at mailbox dot gr @ 2004-10-29 10:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dkouroun at mailbox dot gr  2004-10-29 10:25 -------
Created an attachment (id=7427)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7427&action=view)
source code and the results in README.1, README.2


-- 


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


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

* [Bug target/18216] Different results when an array is statically/dynamically allocated
  2004-10-29 10:23 [Bug c++/18216] New: Different results when an array is statically/dynamically allocated dkouroun at mailbox dot gr
  2004-10-29 10:25 ` [Bug c++/18216] " dkouroun at mailbox dot gr
@ 2004-10-29 11:36 ` pinskia at gcc dot gnu dot org
  2004-10-29 13:06 ` pinskia at gcc dot gnu dot org
  2004-10-29 13:27 ` bangerth at dealii dot org
  3 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-29 11:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-29 11:36 -------
This might be related to PR 17990.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target


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


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

* [Bug target/18216] Different results when an array is statically/dynamically allocated
  2004-10-29 10:23 [Bug c++/18216] New: Different results when an array is statically/dynamically allocated dkouroun at mailbox dot gr
  2004-10-29 10:25 ` [Bug c++/18216] " dkouroun at mailbox dot gr
  2004-10-29 11:36 ` [Bug target/18216] " pinskia at gcc dot gnu dot org
@ 2004-10-29 13:06 ` pinskia at gcc dot gnu dot org
  2004-10-29 13:27 ` bangerth at dealii dot org
  3 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-29 13:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-29 13:06 -------
The source is not fully compilable.  You missed the timing.h header.

-- 


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


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

* [Bug target/18216] Different results when an array is statically/dynamically allocated
  2004-10-29 10:23 [Bug c++/18216] New: Different results when an array is statically/dynamically allocated dkouroun at mailbox dot gr
                   ` (2 preceding siblings ...)
  2004-10-29 13:06 ` pinskia at gcc dot gnu dot org
@ 2004-10-29 13:27 ` bangerth at dealii dot org
  3 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-10-29 13:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-10-29 13:27 -------
I can't compile your code, due to this: 
g/x> /home/bangerth/bin/gcc-3.4.3-pre/bin/c++ main1.cc 
main1.cc:3:20: timing.h: No such file or directory 
main1.cc:9: error: `R' does not name a type 
main1.cc: In function `int main(int, char**)': 
main1.cc:20: error: `indexType' does not name a type 
main1.cc:21: error: `indexType' undeclared (first use this function) 
main1.cc:21: error: (Each undeclared identifier is reported only once for each 
function it appears in.) 
main1.cc:21: error: expected `;' before "i" 
[...] 
 
The file timing.h isn't in your tarball. 
 
But besides that, can you try to come up with a smaller and more obvious 
testcase? You may be able to merge everything into one file which would 
make things more obvious. 
 
Thanks 
 W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug target/18216] Different results when an array is statically/dynamically allocated
       [not found] <bug-18216-4@http.gcc.gnu.org/bugzilla/>
@ 2021-09-10  8:16 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-10  8:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18216

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I get no difference between statically allocated V or dynamically allocated.
I do get a difference with -m32 and -m32 -msse2 -mfpmath=sse (which is exactly
the difference between ICC and GCC).

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

* [Bug target/18216] Different results when an array is statically/dynamically allocated
       [not found] <bug-18216-9399@http.gcc.gnu.org/bugzilla/>
@ 2005-10-06 18:17 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06 18:17 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


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


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

end of thread, other threads:[~2021-09-10  8:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-29 10:23 [Bug c++/18216] New: Different results when an array is statically/dynamically allocated dkouroun at mailbox dot gr
2004-10-29 10:25 ` [Bug c++/18216] " dkouroun at mailbox dot gr
2004-10-29 11:36 ` [Bug target/18216] " pinskia at gcc dot gnu dot org
2004-10-29 13:06 ` pinskia at gcc dot gnu dot org
2004-10-29 13:27 ` bangerth at dealii dot org
     [not found] <bug-18216-9399@http.gcc.gnu.org/bugzilla/>
2005-10-06 18:17 ` pinskia at gcc dot gnu dot org
     [not found] <bug-18216-4@http.gcc.gnu.org/bugzilla/>
2021-09-10  8:16 ` pinskia at gcc dot gnu.org

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).