This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Restrict Bug ? Re: [PATCH] add FTensor to 3.1 release criteria


On Wed, Apr 03, 2002 at 05:07:59PM -0500, Daniel Berlin wrote:
> On Wed, 2002-04-03 at 14:20, Janis Johnson wrote:
> > On March 25 in http://gcc.gnu.org/ml/gcc/2002-03/msg01534.html,
> > Walter Landry suggested that his C++ tensor library would be a useful
> > addition to the set of GCC 3.1 integration tests.  This package has
> > exposed a number of g++ template bugs (now fixed) and Walter was only
> > recently able to compile it with GCC.  I ran it on ia64-linux with
> > various optimizations and it uncovered some optimization problems.
> > 
> 
> At least for me, it seems to still expose a array type building bug:
> template <class T, int dim>
> class bob
> {
> 	T * restrict a[dim];
> };
> 
> gives
> test.h:4: `__restrict' qualifiers cannot be applied to `T*[dim]'
> 
> (I modified lex.c, adding the one line necessary to recognize "restrict"
> as RID_RESTRICT.  You can use __restrict in the above, if you like)
> 
[snip lots of good stuff]

In the version that Walter set up for GCC integration testing, the
Makefile includes

CXX = g++
CXXOPTIMIZE =
CXXFLAGS=-ftemplate-depth-100 -Drestrict= -w -DFTENSOR_DEBUG $(CXXOPTIMIZE)

so it doesn't address the use of restrict.  I'll let you guys figure
that out separately.  Meanwhile, FTensor is useful for finding other
problems by redefining CXXOPTIMIZE and not CXXFLAGS.

Janis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]