On Tue, Jul 12, 2016 at 03:50:14PM +0200, Thomas Schwinge wrote: > Hi! > > Templated, and "auto", trailing return type syntax with the C++ OpenACC > routine directive all works, but doesn't have test coverage. OK for > trunk? > > commit 7a387329674b07b8eb7e07cff665250284b4524b > Author: Thomas Schwinge <tho...@codesourcery.com> > Date: Thu Jul 7 16:12:15 2016 +0200 > > C++ OpenACC routine directive testing: templated, and "auto", trailing > return type syntax > > libgomp/ > * testsuite/libgomp.oacc-c++/routine-1-auto.C: New file. > * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Likewise. > * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C: > Likewise. > * testsuite/libgomp.oacc-c++/routine-1-template.C: Likewise. > * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: > Likewise. > * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Adjust.
Ok. Though looking at the testcases, they will crash if malloc fails and all the allocations of small buffers look kind of pointless. Wouldn't s = (int *) malloc (sizeof (int) * n); g = (int *) malloc (sizeof (int) * n); w = (int *) malloc (sizeof (int) * n); v = (int *) malloc (sizeof (int) * n); gw = (int *) malloc (sizeof (int) * n); gv = (int *) malloc (sizeof (int) * n); wv = (int *) malloc (sizeof (int) * n); gwv = (int *) malloc (sizeof (int) * n); be better replaced with int buf[80]; s = buf; g = s + n; w = g + n; ... ? Jakub