* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
@ 2005-10-31 23:46 ` xeon at gmx dot ch
2005-11-01 0:34 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: xeon at gmx dot ch @ 2005-10-31 23:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from xeon at gmx dot ch 2005-10-31 23:46 -------
Created an attachment (id=10092)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10092&action=view)
preprocessed source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
2005-10-31 23:46 ` [Bug c++/24602] " xeon at gmx dot ch
@ 2005-11-01 0:34 ` pinskia at gcc dot gnu dot org
2005-11-01 2:22 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-01 0:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-11-01 00:33 -------
This is a true C++ front-end problem, in that the seg fault is due to a stack
overflow in the C++ front-end. I think this is a regression but I have not
tried to reduce it yet.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
2005-10-31 23:46 ` [Bug c++/24602] " xeon at gmx dot ch
2005-11-01 0:34 ` pinskia at gcc dot gnu dot org
@ 2005-11-01 2:22 ` pinskia at gcc dot gnu dot org
2005-11-01 2:23 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-01 2:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-11-01 02:22 -------
With the source here, I was able to find a different issue which I will be
posting soon.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (2 preceding siblings ...)
2005-11-01 2:22 ` pinskia at gcc dot gnu dot org
@ 2005-11-01 2:23 ` pinskia at gcc dot gnu dot org
2005-11-01 3:09 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-01 2:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-11-01 02:23 -------
Note the backtrace for the orginal issue is:
#28 0x000000000040bb94 in convert_like_real (convs=Variable "convs" is not
available.
) at /home/pinskia/src/newtest/trunk/gcc/cp/call.c:4379
#29 0x000000000040c241 in build_over_call (cand=0x15009b8, flags=1067) at
/home/pinskia/src/newtest/trunk/gcc/cp/call.c:4804
#30 0x000000000040aacd in build_new_method_call (instance=0x2aaaadbb4a40,
fns=Variable "fns" is not available.
) at /home/pinskia/src/newtest/trunk/gcc/cp/call.c:5441
#31 0x000000000040b5fa in convert_like_real (convs=0x15006e8,
expr=0x2aaaabf002c0, fn=0x2aaaabacd100, argnum=0, inner=-1,
issue_conversion_warnings=0 '\0',
c_cast_p=0 '\0') at /home/pinskia/src/newtest/trunk/gcc/cp/call.c:4293
#32 0x000000000040b71e in convert_like_real (convs=0x1500710,
expr=0x2aaaabf002c0, fn=0x2aaaabacd100, argnum=0, inner=0,
issue_conversion_warnings=1 '\001',
c_cast_p=0 '\0') at /home/pinskia/src/newtest/trunk/gcc/cp/call.c:4304
#33 0x000000000040c241 in build_over_call (cand=0x1500738, flags=3) at
/home/pinskia/src/newtest/trunk/gcc/cp/call.c:4804
#34 0x000000000040aacd in build_new_method_call (instance=0x2aaaadbb49c0,
fns=Variable "fns" is not available.
) at /home/pinskia/src/newtest/trunk/gcc/cp/call.c:5441
#35 0x00000000004b5c9f in ocp_convert (type=0x2aaaabab5420,
expr=0x2aaaabf002c0, convtype=Variable "convtype" is not available.
) at /home/pinskia/src/newtest/trunk/gcc/cp/cvt.c:764
#
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (3 preceding siblings ...)
2005-11-01 2:23 ` pinskia at gcc dot gnu dot org
@ 2005-11-01 3:09 ` pinskia at gcc dot gnu dot org
2005-11-01 4:36 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-01 3:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-11-01 03:09 -------
PR 24606 is the other issue I found.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |24606
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (4 preceding siblings ...)
2005-11-01 3:09 ` pinskia at gcc dot gnu dot org
@ 2005-11-01 4:36 ` pinskia at gcc dot gnu dot org
2005-11-17 11:59 ` reichelt at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-01 4:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-01 04:36 -------
Reduced testcase:
struct string;
struct _Deque_iterator {
string &operator*() const;
};
template<typename _Function> void for_each(_Function __f) {
_Deque_iterator __first1;
__f(*__first1);
}
struct locale {
locale(const locale& __other) throw();
};
template<typename SequenceT>
void trim(string& Input, const locale& Loc=locale());
int main() {
for_each(trim<string>);
}
----
This one also ICEs with ICC. I will let someone else decide if this is valid
or invalid code and then confirm it.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Known to fail| |2.95.3 3.3.3 3.4.0 4.0.0
| |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (5 preceding siblings ...)
2005-11-01 4:36 ` pinskia at gcc dot gnu dot org
@ 2005-11-17 11:59 ` reichelt at gcc dot gnu dot org
2007-07-23 22:05 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-11-17 11:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from reichelt at gcc dot gnu dot org 2005-11-17 11:59 -------
Here's a sightly simpler testcase.
If I remove the copy-ctor from A, I get the failure from PR24606.
=========================================
template<typename F> void foo(F f)
{
f();
}
struct A
{
A();
A(const A&);
};
template<int> void bar(A = A());
void baz()
{
foo(bar<0>);
}
=========================================
Btw, removing the template from "bar" makes the code compile.
So it seems like the code is valid after all.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code, monitored
Last reconfirmed|0000-00-00 00:00:00 |2005-11-17 11:59:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (6 preceding siblings ...)
2005-11-17 11:59 ` reichelt at gcc dot gnu dot org
@ 2007-07-23 22:05 ` reichelt at gcc dot gnu dot org
2007-07-23 22:08 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-07-23 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from reichelt at gcc dot gnu dot org 2007-07-23 22:05 -------
Since Nathan's patch for PR32839, we get the following error message for the
testcase in comment #7 (and similar messages for the original testcase, the
testcase in comment #6, and PR 24606):
bug.cc: In function 'void foo(F) [with F = void (*)(A)]':
bug.cc:16: instantiated from here
bug.cc:3: error: too few arguments to function
I get the same error message if I make bar a non-template function.
In contrast to my last sentence of comment #7, I now think the compiler
does the right thing here.
Nathan, do you think so, too?
If yes, we can close this bug as fixed.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at gcc dot gnu dot
| |org
Keywords|ice-on-valid-code |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (7 preceding siblings ...)
2007-07-23 22:05 ` reichelt at gcc dot gnu dot org
@ 2007-07-23 22:08 ` reichelt at gcc dot gnu dot org
2007-11-01 12:53 ` reichelt at gcc dot gnu dot org
2008-03-29 17:33 ` reichelt at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-07-23 22:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from reichelt at gcc dot gnu dot org 2007-07-23 22:08 -------
*** Bug 24606 has been marked as a duplicate of this bug. ***
--
Bug 24602 depends on bug 24606, which changed state.
Bug 24606 Summary: ICE on template function which gets an template agrument as a function with a default argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24606
What |Old Value |New Value
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (8 preceding siblings ...)
2007-07-23 22:08 ` reichelt at gcc dot gnu dot org
@ 2007-11-01 12:53 ` reichelt at gcc dot gnu dot org
2008-03-29 17:33 ` reichelt at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-01 12:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from reichelt at gcc dot gnu dot org 2007-11-01 12:52 -------
Nathan confirmed in private mail that the compiler now does the right thing.
So closing as fixed.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/24602] g++: Internal error: Illegal instruction (program cc1plus)
2005-10-31 23:38 [Bug c++/24602] New: g++: Internal error: Illegal instruction (program cc1plus) xeon at gmx dot ch
` (9 preceding siblings ...)
2007-11-01 12:53 ` reichelt at gcc dot gnu dot org
@ 2008-03-29 17:33 ` reichelt at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-29 17:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from reichelt at gcc dot gnu dot org 2008-03-29 17:32 -------
*** Bug 35596 has been marked as a duplicate of this bug. ***
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kevin at kelphead dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24602
^ permalink raw reply [flat|nested] 12+ messages in thread