public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20032] New: internal error
@ 2005-02-17 22:07 pentek_imre at mailbox dot hu
  2005-02-17 22:24 ` [Bug c++/20032] " pinskia at gcc dot gnu dot org
  2005-02-18 19:04 ` [Bug c++/20032] ICE on non-constant array size in template reichelt at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pentek_imre at mailbox dot hu @ 2005-02-17 22:07 UTC (permalink / raw)
  To: gcc-bugs

Here you find two files:
http://people.inf.elte.hu/pentek_i/doksik/Linux/bugs/gcc/
they caused an internal error, and asked me to report a bug.

-- 
           Summary: internal error
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pentek_imre at mailbox dot hu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu


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


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

* [Bug c++/20032] internal error
  2005-02-17 22:07 [Bug c++/20032] New: internal error pentek_imre at mailbox dot hu
@ 2005-02-17 22:24 ` pinskia at gcc dot gnu dot org
  2005-02-18 19:04 ` [Bug c++/20032] ICE on non-constant array size in template reichelt at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-17 22:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-17 17:48 -------
Can you read http://gcc.gnu.org/bugs.html like the ICE said and provide all the needed information.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


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


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

* [Bug c++/20032] ICE on non-constant array size in template
  2005-02-17 22:07 [Bug c++/20032] New: internal error pentek_imre at mailbox dot hu
  2005-02-17 22:24 ` [Bug c++/20032] " pinskia at gcc dot gnu dot org
@ 2005-02-18 19:04 ` reichelt at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-02-18 19:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-02-18 13:00 -------
The problem can be reduced to the following testacse:

==================================
int Sum(int);

template<int> struct A
{
    int X[Sum(2)];
    void foo() { sizeof(X); }
};

void bar()
{
    A<0> a;
    a.foo();
}
==================================

The code is invalid, since the array size "Sum(2)" is not a constant.
Even the definition 
  inline int Sum(unsigned int n) { return n*(n+1)/2; }
from the original test case doesn't change this.

The ICE was fixed by Mark's patch for PR 18429
http://gcc.gnu.org/ml/gcc-cvs/2004-11/msg00582.html
We now (i.e. in gcc 4.0.0) emit a proper error message.

Closing, since this is not a regression.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |ice-on-invalid-code
         Resolution|                            |FIXED
            Summary|internal error              |ICE on non-constant array
                   |                            |size in template
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2005-02-18 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-17 22:07 [Bug c++/20032] New: internal error pentek_imre at mailbox dot hu
2005-02-17 22:24 ` [Bug c++/20032] " pinskia at gcc dot gnu dot org
2005-02-18 19:04 ` [Bug c++/20032] ICE on non-constant array size in template reichelt 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).