public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36414]  New: g++ causes segmentation violation on template test program
@ 2008-06-01 21:31 kemal dot ebcioglu at acm dot org
  2008-06-01 21:37 ` [Bug c++/36414] " kemal dot ebcioglu at acm dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: kemal dot ebcioglu at acm dot org @ 2008-06-01 21:31 UTC (permalink / raw)
  To: gcc-bugs

g++ version 3.4.4 leads to an internal compiler error/segmentation violation
on cygwin/vista with -O option, on the  C++ template test program
testBug2.cpp (to be attached to be message).



Output of

g++ -v -save-temps -O testBug2.cpp

is shown below:
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure
--verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls
--without-included-gettext --enable-version-specific-runtime-libs --without-x
--enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter
--disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm
--disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization
--enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1plus.exe -E -quiet -v -D__CYGWIN32__
-D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api -idirafter
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/../../include/w32api
testBug2.cpp -mtune=pentiumpro -O -o testBug2.ii
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/include"
ignoring duplicate directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include
 /usr/include
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api
End of search list.
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1plus.exe -fpreprocessed testBug2.ii
-quiet -dumpbase testBug2.cpp -mtune=pentiumpro -auxbase testBug2 -O -version
-o testBug2.s
GNU C++ version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
(i686-pc-cygwin)
        compiled by GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd
0.125).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
testBug2.cpp: In member function `Iter<S, T, advnc, retrv> Iter<S, T, advnc,
retrv>::operator++() [with S = Test, T = char, int (*advnc)(int, S*) =
Test::advance, T (*retrv)(int, S*) = Test::retrieve]':
testBug2.cpp:144:   instantiated from here
testBug2.cpp:56: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://cygwin.com/problems.html> for instructions.

By the way,

g++ testBug2.cpp

works. The error apparently only occurs with the -O option.

The attached program testBug2.cpp is self-contained and does not need include
files.


-- 
           Summary: g++ causes segmentation violation on template test
                    program
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kemal dot ebcioglu at acm dot org


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


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

* [Bug c++/36414] g++ causes segmentation violation on template test program
  2008-06-01 21:31 [Bug c++/36414] New: g++ causes segmentation violation on template test program kemal dot ebcioglu at acm dot org
@ 2008-06-01 21:37 ` kemal dot ebcioglu at acm dot org
  2008-06-01 21:49 ` [Bug middle-end/36414] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kemal dot ebcioglu at acm dot org @ 2008-06-01 21:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kemal dot ebcioglu at acm dot org  2008-06-01 21:36 -------
Created an attachment (id=15710)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15710&action=view)
test case for recreating segmentation violation error

On the current release of cygwin, try

g++ -O testBug2.cpp

to recreate the segmentation violation error

g++ testBug2.cpp
./a

works.


-- 


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


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

* [Bug middle-end/36414] g++ causes segmentation violation on template test program
  2008-06-01 21:31 [Bug c++/36414] New: g++ causes segmentation violation on template test program kemal dot ebcioglu at acm dot org
  2008-06-01 21:37 ` [Bug c++/36414] " kemal dot ebcioglu at acm dot org
@ 2008-06-01 21:49 ` pinskia at gcc dot gnu dot org
  2008-06-02  5:47 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-06-01 21:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-06-01 21:48 -------
3.4.x is old and no longer maintained, can you try 4.1.2 or 4.2.5 or 4.3.0?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |middle-end
 GCC target triplet|                            |i686-pc-cygwin


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


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

* [Bug middle-end/36414] g++ causes segmentation violation on template test program
  2008-06-01 21:31 [Bug c++/36414] New: g++ causes segmentation violation on template test program kemal dot ebcioglu at acm dot org
  2008-06-01 21:37 ` [Bug c++/36414] " kemal dot ebcioglu at acm dot org
  2008-06-01 21:49 ` [Bug middle-end/36414] " pinskia at gcc dot gnu dot org
@ 2008-06-02  5:47 ` steven at gcc dot gnu dot org
  2008-06-02  8:51 ` rguenth at gcc dot gnu dot org
  2008-06-04 22:41 ` kemal dot ebcioglu at acm dot org
  4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-06-02  5:47 UTC (permalink / raw)
  To: gcc-bugs



-- 

steven at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/36414] g++ causes segmentation violation on template test program
  2008-06-01 21:31 [Bug c++/36414] New: g++ causes segmentation violation on template test program kemal dot ebcioglu at acm dot org
                   ` (2 preceding siblings ...)
  2008-06-02  5:47 ` steven at gcc dot gnu dot org
@ 2008-06-02  8:51 ` rguenth at gcc dot gnu dot org
  2008-06-04 22:41 ` kemal dot ebcioglu at acm dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-02  8:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-06-02 08:50 -------
Fixed in 4.0.0


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
      Known to fail|                            |3.4.6
      Known to work|                            |4.0.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

* [Bug middle-end/36414] g++ causes segmentation violation on template test program
  2008-06-01 21:31 [Bug c++/36414] New: g++ causes segmentation violation on template test program kemal dot ebcioglu at acm dot org
                   ` (3 preceding siblings ...)
  2008-06-02  8:51 ` rguenth at gcc dot gnu dot org
@ 2008-06-04 22:41 ` kemal dot ebcioglu at acm dot org
  4 siblings, 0 replies; 6+ messages in thread
From: kemal dot ebcioglu at acm dot org @ 2008-06-04 22:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kemal dot ebcioglu at acm dot org  2008-06-04 22:40 -------
(In reply to comment #3)
> Fixed in 4.0.0
> 
Thanks! I also verified that the template test case works in g++ version 4.3.0
on VMWare/Linux/Fedora 9, with the -O option. 


-- 


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


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

end of thread, other threads:[~2008-06-04 22:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-01 21:31 [Bug c++/36414] New: g++ causes segmentation violation on template test program kemal dot ebcioglu at acm dot org
2008-06-01 21:37 ` [Bug c++/36414] " kemal dot ebcioglu at acm dot org
2008-06-01 21:49 ` [Bug middle-end/36414] " pinskia at gcc dot gnu dot org
2008-06-02  5:47 ` steven at gcc dot gnu dot org
2008-06-02  8:51 ` rguenth at gcc dot gnu dot org
2008-06-04 22:41 ` kemal dot ebcioglu at acm 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).