public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14029] New: [tree-ssa] wrong-code
@ 2004-02-05 12:54 stefaandr at hotmail dot com
  2004-02-05 16:30 ` [Bug optimization/14029] " bangerth at dealii dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: stefaandr at hotmail dot com @ 2004-02-05 12:54 UTC (permalink / raw)
  To: gcc-bugs

Following code (sorry, still contains STL, but I did a lot of trimming 
already) gives a wrong result when optimization is enabled: 
 
#include <vector> 
#include <algorithm> 
 
struct a { 
  int n; 
  bool operator==(a const & other) const { return n == other.n; }; 
}; 
 
int main() { 
  a a1; std::vector <a> as; 
  a1.n = 4; for (int i=0; i<4; ++i) as.push_back(a1); 
  a1.n = 7; as.push_back(a1); 
  return std::find(as.begin(), as.end(), a1) == as.end(); 
}; 
 
Reading specs 
from /esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/specs 
Configured with: /esat/firenze/tmp/src/gcc/ssa/configure --program-suffix=-ssa 
--prefix=/esat/olympia/install --enable-languages=c,c++ 
Thread model: posix 
gcc version 3.5-tree-ssa 20040204 (merged 20040126) 
 /esat/olympia/install/libexec/gcc/i686-pc-linux-gnu/3.5-tree-ssa/cc1plus 
-quiet -v -D_GNU_SOURCE tst.cpp -quiet -dumpbase tst.cpp -mtune=pentiumpro 
-auxbase tst -O9 -version -o /tmp/ccQc86SB.s 
ignoring nonexistent directory 
"/esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../i686-pc-linux-gnu/include" 
#include "..." search starts here: 
#include <...> search starts here: 
 /esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa 
 /esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa/i686-pc-linux-gnu 
 /esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa/backward 
 /usr/local/include 
 /esat/olympia/install/include 
 /esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/include 
 /usr/include 
End of search list. 
GNU C++ version 3.5-tree-ssa 20040204 (merged 20040126) (i686-pc-linux-gnu) 
        compiled by GNU C version 3.3.1. 
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 
 as -V -Qy -o /tmp/cco9g0GA.o /tmp/ccQc86SB.s 
GNU assembler version 2.14 (i686-pc-linux-gnu) using BFD version 2.14 20030612 
 /esat/olympia/install/libexec/gcc/i686-pc-linux-gnu/3.5-tree-ssa/collect2 
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o 
tst /usr/lib/crt1.o /usr/lib/crti.o /esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/crtbegin.o 
-L/esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa 
-L/esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../.. /tmp/cco9g0GA.o 
-lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s 
-lgcc /esat/olympia/install/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/crtend.o /usr/lib/crtn.o

-- 
           Summary: [tree-ssa] wrong-code
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stefaandr at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-09-14 22:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-05 12:54 [Bug optimization/14029] New: [tree-ssa] wrong-code stefaandr at hotmail dot com
2004-02-05 16:30 ` [Bug optimization/14029] " bangerth at dealii dot org
2004-02-05 16:41 ` bangerth at dealii dot org
2004-02-05 18:37 ` [Bug optimization/14029] [tree-ssa] Miscompilation of unrolled loop bangerth at dealii dot org
2004-02-06  3:11 ` [Bug c++/14029] [tree-ssa] Miscompilation of unrolled loop due to Iterator::base having an aliasing problem pinskia at gcc dot gnu dot org
2004-02-09  2:21 ` pinskia at gcc dot gnu dot org
2004-03-01 16:57 ` amacleod at redhat dot com
2004-05-15  3:38 ` [Bug tree-optimization/14029] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-07-10  1:25 ` pinskia at gcc dot gnu dot org
2004-07-26 22:46 ` pinskia at gcc dot gnu dot org
2004-08-23  3:12 ` cvs-commit at gcc dot gnu dot org
2004-08-23  3:13 ` pinskia at gcc dot gnu dot org
2004-08-23  4:02 ` cvs-commit at gcc dot gnu dot org
2004-08-23 18:25 ` cvs-commit at gcc dot gnu dot org
2004-08-23 18:28 ` cvs-commit at gcc dot gnu dot org
2004-09-14 22:58 ` [Bug tree-optimization/14029] [4.0 " dnovillo at gcc dot gnu dot 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).