This is the mail archive of the gcc-bugs@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: c/8730: [3.2/3.3/3.4 regression] Cannot compile C function inside other C function


Yes, please file a new problem report.

I tried your new test case with some compilers on my system and found
that it compiles cleanly with GCC 2.95.3 but starts getting an internal
compiler error with GCC 3.0.x.

Janis

On Tue, Jul 01, 2003 at 10:00:58AM +0200, Ilgis Ibragimow wrote:
> Thank you for your answer! Yes, this example is working on
> "gcc version 3.3", but I have almost the same source that
> does not work on this new compiler (with -O0 and -O3).
> I cannot understand the reason since it has same type of
> constructions.
> 
> The source is attached. Would you please to suggest me,
> should I submit it as the new bug?
> 
> Sincerely
> 
> Ilghiz
> 
> 
> 
> Janis Johnson wrote:
> 
> > The fix went in on March 31, but your compiler is a prerelease version
> > from Feburary 26 (20030226 in the version is the date).  The GCC 3.3
> > release includes the fix, and I verified that the current 3.3 branch
> > compiles your original test case.
> >
> > Janis
> >
> > On Mon, Jun 30, 2003 at 11:18:28AM +0200, Ilgis Ibragimow wrote:
> > > Hi,
> > >
> > > I got a new release of gcc version 3.3 20030226 (prerelease) (SuSE Linux)
> > > and observe an interesting thing:
> > >
> > > this short example with "foo" functions compiles fine, but my source
> > > still produce the following error:
> > >
> > > *********************************************************
> > > gcc: Internal error: Segmentation fault (program cc1)
> > > Please submit a full bug report.
> > > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> > > *********************************************************
> > >
> > > so, please, would you be so kind to mark my bug as:
> > >
> > > 1) not the same as the bug 9936;
> > > 2) mark this please, as NOT FIXED.
> > >
> > > Sincerely
> > >
> > > Dr. Ilghiz Ibraghimov
> > >
> > >
> > > Janis Johnson wrote:
> > >
> > > > On Tue, Apr 01, 2003 at 11:08:39AM +0200, Steven Bosscher wrote:
> > > > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8730
> > > > >
> > > > > I cannot reproduce this PR anymore.   The testcase,
> > > > >
> > > > >     void foo()
> > > > >     {
> > > > >       void* bar(int i, int A[1][i]) { return A[0]; }
> > > > >     }
> > > > >
> > > > > compilers fine for me with today's CVS (3.3 20030401).  Could it be
> > > > > that this PR got fixed with Mark Mitchell's patch for 9936?
> > > > > (http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00018.html)
> > > >
> > > > My regression hunting scripts verify that this patch fixes
> > > > the problem.  I used the original larger test case on
> > > > i686-pc-linux-gnu.
> > > >
> > > > Janis

>  void *mNew(int cLen, int Len);
>  void mFree(void *ptr);
> 
>  double dSlvSys(int N, int NRHS, double *A, double B[NRHS][N], double S[N]);
> 
>  void dParaFac(int N, int NN[N+1], int Rank, double *A,
>                double B[Rank][NN[N]+1], int MaxIter, double Eps,
>                int PrintStride)
>  { double Res;
>    int ci;
>    double *S;
> 
>  void ParaFac1(double BB[NN[ci+1]-NN[ci]][Rank], double D[N][Rank][Rank])
>  { Res=dSlvSys(Rank, NN[ci+1]-NN[ci], D[ci][0], BB, S);
>    return;
>  }
> 
>    double *id;
>    void *ibb;
> 
>    ibb=mNew(sizeof(double), 100*Rank);
>    id=mNew(sizeof(double), N*Rank*Rank);
>    S=mNew(sizeof(double), Rank);
>    for(ci=0; ci<N; ci++)
>      ParaFac1(ibb, (void*)id);
>    mFree(S);
>    mFree(id);
>    mFree(ibb);
>    return;
>  }


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