This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34624] valid c++ code doesn't compile for x86_64, but for i386
- From: "Ralf dot Wildenhues at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jan 2008 07:42:16 -0000
- Subject: [Bug c++/34624] valid c++ code doesn't compile for x86_64, but for i386
- References: <bug-34624-12873@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from Ralf dot Wildenhues at gmx dot de 2008-01-14 07:42 -------
This fails with both -m32 and -m64 (but I'm not quite sure if it
still reproduces the original issue):
typedef unsigned long size_t;
template<typename _Tp, size_t _Nm = 1> struct array { };
template<typename sampletype, unsigned int size>
struct my_table: public array<sampletype, size> { };
template<typename sampletype, unsigned int size>
inline const sampletype *
get_samples(array<sampletype, size> const & buffer) {
return buffer.begin();
}
int main() {
my_table<float, 1024> tab;
const float * ptr = get_samples(tab);
}
--
Ralf dot Wildenhues at gmx dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Ralf dot Wildenhues at gmx
| |dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34624