[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#406324: g++-4.1: ICE in type_dependent_expression_p with this 10 lines long code



Package: g++-4.1
Version: 4.1.1-19
Severity: normal

Hello!

$ cat iceme2.cpp
namespace A {
	class ex;
	struct f { f(const ex& x); };
}

namespace B {
	template<typename T> inline A::f g(const T& p) { 
		return f(A::ex(p)); }
}

$ g++ -O0 -c iceme2.cpp
iceme2.cpp: In function ‘A::f B::g(const T&)’:
iceme2.cpp:8: internal compiler error: in type_dependent_expression_p, at cp/pt.c:12739
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
Preprocessed source stored into /tmp/ccExAvlj.out file, please attach this to your bugreport.

g++ 4.0, 3.4 fail in the similar way. g++ 3.3 accepts (erroneously)
this invalid code.

Best regards,
 Alexei


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17.11-grsec-em64t-p4
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)

Versions of packages g++-4.1 depends on:
ii  gcc-4.1                      4.1.1-19    The GNU C compiler
ii  gcc-4.1-base                 4.1.1-19    The GNU Compiler Collection (base 
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libstdc++6-4.1-dev           4.1.1-19    The GNU Standard C++ Library v3 (d

g++-4.1 recommends no packages.

-- no debconf information

-- 
All science is either physics or stamp collecting.

Attachment: signature.asc
Description: Digital signature


Reply to: