From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24123 invoked by alias); 30 Dec 2007 13:27:23 -0000 Received: (qmail 23628 invoked by uid 48); 30 Dec 2007 13:27:09 -0000 Date: Sun, 30 Dec 2007 13:27:00 -0000 Subject: [Bug c++/34624] New: valid c++ code doesn't compile for x86_64, but for i386 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tim at klingt dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg02407.txt.bz2 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&)’ tim@laptop:~$ #include typedef unsigned int uint; template struct my_table: public boost::array {}; template inline const sampletype * get_samples(boost::array const & buffer) { return buffer.begin(); } int main() { my_table 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