public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30864]  New: ice for legal code with -O3
@ 2007-02-19 20:45 dcb314 at hotmail dot com
  2007-02-19 20:46 ` [Bug c++/30864] " dcb314 at hotmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2007-02-19 20:45 UTC (permalink / raw)
  To: gcc-bugs

I just tried to compile Suse Linux package vym-1.8.1-39
with the GNU C++ compiler version 4.3 snapshot 20070216.

The compiler said

main.cpp: In function 'void __tcf_8(void*)':
main.cpp:123: internal compiler error: in alloc_aux_for_block, at cfg.c:665
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O3 required.


-- 
           Summary: ice for legal code with -O3
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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

* [Bug c++/30864] ice for legal code with -O3
  2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
@ 2007-02-19 20:46 ` dcb314 at hotmail dot com
  2007-02-19 20:50 ` [Bug middle-end/30864] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2007-02-19 20:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dcb314 at hotmail dot com  2007-02-19 20:45 -------
Created an attachment (id=13070)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13070&action=view)
gzipped C++ source code


-- 


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


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

* [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O3
  2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
  2007-02-19 20:46 ` [Bug c++/30864] " dcb314 at hotmail dot com
@ 2007-02-19 20:50 ` pinskia at gcc dot gnu dot org
  2007-02-22  6:59 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-19 20:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-02-19 20:50 -------
Reducing ...


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
 GCC target triplet|x86_64-suse-linux-gnu       |
            Summary|ice for legal code with -O3 |[4.3 Regression] ice for
                   |                            |legal code with -O3
   Target Milestone|---                         |4.3.0


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


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

* [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O3
  2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
  2007-02-19 20:46 ` [Bug c++/30864] " dcb314 at hotmail dot com
  2007-02-19 20:50 ` [Bug middle-end/30864] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-02-22  6:59 ` pinskia at gcc dot gnu dot org
  2007-02-22 19:05 ` [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O2 pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-22  6:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-02-22 06:58 -------
While reducing this bug I found an unrelated to this source bug 30917 so I have
to rereduce this.


-- 


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


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

* [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O2
  2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2007-02-22  6:59 ` pinskia at gcc dot gnu dot org
@ 2007-02-22 19:05 ` pinskia at gcc dot gnu dot org
  2007-03-19 10:55 ` wouter dot vermaelen at pi dot be
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-22 19:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-02-22 19:04 -------
Reduced testcase:
struct QString { ~QString(); };
template <class T> struct QValueListNode {
        QValueListNode<T>* next;
        T data;
};
template <class T> struct QValueListPrivate
{
        ~QValueListPrivate()
        {
                QValueListNode<T>* p = node->next;
                while( p != node )
                {
                        QValueListNode<T>* x = p->next;
                        delete p;
                        p = x;
                }
        }
        QValueListNode<T>* node;
};
struct Option { QString sarg; };
struct Options {
        QString helptext;
        QValueListPrivate <QString> filelist;
        QValueListPrivate <Option> optlist;
};
Options options;


--------------------------------
Backtrace:
#0  fancy_abort (file=0xda8f04 "../../gcc/cfg.c", line=665, function=0xda92c0
"alloc_aux_for_block") at ../../gcc/diagnostic.c:642
#1  0x00797674 in alloc_aux_for_block (bb=0xf6fbe0, size=24) at
../../gcc/cfg.c:665
#2  0x007979d8 in alloc_aux_for_blocks (size=24) at ../../gcc/cfg.c:693
#3  0x00989adc in estimate_bb_frequencies () at ../../gcc/predict.c:1712
#4  0x004b7594 in execute_function_todo (data=0x463d) at ../../gcc/passes.c:899
#5  0x004b6e70 in do_per_function (callback=0x4b71d4 <execute_function_todo>,
data=0x463d) at ../../gcc/passes.c:754
#6  0x004b76d8 in execute_todo (flags=17981) at ../../gcc/passes.c:932
#7  0x004b7e0c in execute_one_pass (pass=0xe9956c) at ../../gcc/passes.c:1077


(gdb) p *pass
$2 = {
  name = 0xd82eb0 "apply_inline", 


Note I reduced this to be able to reproduce with just -O2.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-02-22 19:04:49
               date|                            |
            Summary|[4.3 Regression] ice for    |[4.3 Regression] ice for
                   |legal code with -O3         |legal code with -O2


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


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

* [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O2
  2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2007-02-22 19:05 ` [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O2 pinskia at gcc dot gnu dot org
@ 2007-03-19 10:55 ` wouter dot vermaelen at pi dot be
  2007-03-19 13:21 ` mueller at gcc dot gnu dot org
  2007-03-20 12:49 ` mueller at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: wouter dot vermaelen at pi dot be @ 2007-03-19 10:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from wouter dot vermaelen at pi dot be  2007-03-19 10:55 -------
I hit the same problem. My testcase is slightly shorter, but i'm not sure it's
also actually simpler. Requires -O -finline-functions

> cat bug.ii
struct S {
        S();
        ~S() {}
        void f();
};
void f() {
        int x, y;
        while (x) {
                x = x ? x : y;
        }
}
void g() {
        S s;
        s.f();
}
void h() {
        S s;
        f();
        g();
}

> g++ -O -finline-functions bug.ii
bug.ii: In function 'void h()':
bug.ii:16: internal compiler error: in alloc_aux_for_block, at cfg.c:665


-- 

wouter dot vermaelen at pi dot be changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wouter dot vermaelen at pi
                   |                            |dot be


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


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

* [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O2
  2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2007-03-19 10:55 ` wouter dot vermaelen at pi dot be
@ 2007-03-19 13:21 ` mueller at gcc dot gnu dot org
  2007-03-20 12:49 ` mueller at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mueller at gcc dot gnu dot org @ 2007-03-19 13:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mueller at gcc dot gnu dot org  2007-03-19 13:21 -------
it seems to be caused by -r121780


-- 


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


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

* [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O2
  2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2007-03-19 13:21 ` mueller at gcc dot gnu dot org
@ 2007-03-20 12:49 ` mueller at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mueller at gcc dot gnu dot org @ 2007-03-20 12:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mueller at gcc dot gnu dot org  2007-03-20 12:48 -------
testcase works after PR31146 fix

*** This bug has been marked as a duplicate of 31146 ***


-- 

mueller at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-03-20 12:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 20:45 [Bug c++/30864] New: ice for legal code with -O3 dcb314 at hotmail dot com
2007-02-19 20:46 ` [Bug c++/30864] " dcb314 at hotmail dot com
2007-02-19 20:50 ` [Bug middle-end/30864] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-02-22  6:59 ` pinskia at gcc dot gnu dot org
2007-02-22 19:05 ` [Bug middle-end/30864] [4.3 Regression] ice for legal code with -O2 pinskia at gcc dot gnu dot org
2007-03-19 10:55 ` wouter dot vermaelen at pi dot be
2007-03-19 13:21 ` mueller at gcc dot gnu dot org
2007-03-20 12:49 ` mueller 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).