This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Restrict Bug ? Re: [PATCH] add FTensor to 3.1 release criteria
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Daniel Berlin <dan at dberlin dot org>
- Cc: Janis Johnson <janis187 at us dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 3 Apr 2002 16:20:51 -0800
- Subject: Re: Restrict Bug ? Re: [PATCH] add FTensor to 3.1 release criteria
- References: <20020403112012.A1955@us.ibm.com> <1017871680.12179.22.camel@danberlin.com>
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