This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/1088: Internal compiler error: (default argument in template class)



>Number:         1088
>Category:       c++
>Synopsis:       Internal compiler error: (default argument in template class)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 18 11:06:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Desmond A. Kirkpatrick
>Release:        g++ 2.95.1 / 2.95.2
>Organization:
>Environment:

>Description:
A short segment of code (reduced from a larger program)
elicits an Internal error during compilation in the
2.95 compilers.  Almost any change to the code (removing
the default arguments, or changing the base class vector
to something else) seem to make the problem go away.

Probably an interesting template compilation bug.
>How-To-Repeat:
compile with 2.95 g++ compiler:  Internal error.
Compiles under 2.91 (EGCS)
>Fix:
No good workaround known.  Removing the default
function arg seems to solve.  Also removing the
vector in the base class.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="x.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="x.cc"

Ly8gVGhpcyBmaWxlIGRldGVjdHMgYSBidWcgaW4gdGhlIDIuOTUuMSBjb21waWxlciwKLy8gYnV0
IHByb3Blcmx5IGNvbXBpbGVzIGluIDIuOTEgKGVnY3MpIGNvbXBpbGVyCgojaW5jbHVkZSA8aW9z
dHJlYW0+CiNpbmNsdWRlIDx2ZWN0b3I+Cgp0ZW1wbGF0ZSA8Y2xhc3MgVD4gY2xhc3MgUm5nCnsK
ICAgIHZlY3RvcjxUKj4gX19zZXE7Cn07CgpjbGFzcyBUeXBlIHt9OwoKY2xhc3MgQyB7ZG91Ymxl
IHk7fTsKY2xhc3MgRCB7Y2hhciB5O307CQkvLyBOYW1lIG9mIGZpZWxkIG11c3QgbWF0Y2ggQydz
Cgp0ZW1wbGF0ZSA8Y2xhc3MgVDE+IGNsYXNzIEUgOiBwdWJsaWMgQywgcHVibGljIEQgewpwdWJs
aWM6CiAgdHlwZWRlZiBSbmc8ZmxvYXQ+IHJmOwogIHR5cGVkZWYgUm5nPGludD4gcmk7CgogIHZv
aWQgZjIgKHJmIHIyLCBUeXBlIHQyID0gVHlwZSgpKSB7IH0KICB2b2lkIGYgKHJpIHIsIFR5cGUg
dCA9IFR5cGUoKSkgeyB9Cn07CgppbnQKbWFpbigpCnsKICBFPGludD4qIG5iID0gbmV3IEU8aW50
PigpOwoKICBuYi0+ZihSbmc8aW50PigpKTsKICBuYi0+ZjIoUm5nPGZsb2F0PigpKTsKCiAgcmV0
dXJuIDA7Cn0K

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]