public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tim at klingt dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/34624] New: valid c++ code doesn't compile for x86_64, but for i386 Date: Sun, 30 Dec 2007 13:27:00 -0000 [thread overview] Message-ID: <bug-34624-12873@http.gcc.gnu.org/bugzilla/> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1191 bytes --] the following code compiles on i386, but not for x86_64: tim@laptop:~$ g++ -m32 bug.cpp tim@laptop:~$ tim@laptop:~$ g++ -m64 bug.cpp bug.cpp: In function âint main()â: bug.cpp:69: error: no matching function for call to âget_samples(my_table<float, 1024u>&)â tim@laptop:~$ #include <boost/array.hpp> typedef unsigned int uint; template<typename sampletype, uint size> struct my_table: public boost::array<sampletype, size> {}; template<typename sampletype, uint size> inline const sampletype * get_samples(boost::array<sampletype, size> const & buffer) { return buffer.begin(); } int main() { my_table<float, 1024> tab; const float * ptr = get_samples(tab); } i could reproduce it with the debian packages of gcc-4.1 and 4.2 on i386 and amd64. best, tim -- Summary: valid c++ code doesn't compile for x86_64, but for i386 Product: gcc Version: 4.2.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tim at klingt dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34624
next reply other threads:[~2007-12-30 13:27 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-12-30 13:27 tim at klingt dot org [this message] 2008-01-13 2:34 ` [Bug c++/34624] " bangerth at dealii dot org 2008-01-13 13:03 ` tim at klingt dot org 2008-01-14 9:33 ` Ralf dot Wildenhues at gmx dot de 2008-01-14 11:18 ` rguenth at gcc dot gnu dot org 2008-09-22 12:12 ` tim at klingt dot org 2008-12-30 5:42 ` pinskia at gcc dot gnu dot org 2008-12-30 10:00 ` tim at klingt dot org 2008-12-30 10:00 ` tim at klingt dot org 2008-12-30 10:03 ` tim at klingt dot org 2008-12-30 17:29 ` [Bug c++/34624] templated code is rejected different type in nontype template argument pinskia at gcc dot gnu dot org 2008-12-30 17:31 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-34624-12873@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).