public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3013: templated inline function not inlined
@ 2001-05-31 10:16 buschelm
  0 siblings, 0 replies; only message in thread
From: buschelm @ 2001-05-31 10:16 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3013
>Category:       c++
>Synopsis:       templated inline function not inlined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 31 10:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     buschelm@mcs.anl.gov
>Release:        unknown-1.0
>Organization:
>Environment:
linux
>Description:
The following function, add<4,float>, is not inlined by g++ all versions including the online 3.0 from Code Sourcery (as of today 5/31/01).

<begin file add.cc>

#define SIZE 4

template <int N,class T> inline int add(T*a,T*b) {
  for (int i=0;i<N;i++) a[i]+=b[i];
  return(0);
}

int main(int argc,char *argv[]) {
  float a[SIZE], b[SIZE];
  for (int i=0;i<SIZE;i++) a[i]=b[i]=(float)i;

  add<SIZE>(a,b);
  return(0);
}

<end file add.cc>
>How-To-Repeat:
g++ -S add.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-31 10:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-31 10:16 c++/3013: templated inline function not inlined buschelm

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).