[Bug fortran/17676] New: Problem with user operator

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Sep 26 08:49:00 GMT 2004


We have the following failures on SPARC:

FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -O0 
FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -O1 
FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -O2 
FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -O3
-fomit-frame-pointer 
FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -O3
-fomit-frame-pointer -funroll-loops 
FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -O3
-fomit-frame-pointer -funroll-all-loops -finline-functions 
FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -O3 -g 
FAIL: gfortran.fortran-torture/execute/userop.f90 compilation,  -Os 


The problem is at resolve.c:1418:
	sprintf (msg, "Operands of user operator '%s' at %%L are %s/%s",
		 e->uop->ns->proc_name->name, gfc_typename (&op1->ts),
		 gfc_typename (&op2->ts));

e->uop->ns->proc_name is NULL.  So an out-of-bounds address is passed to sprintf
and we get a SIGSEGV inside the libc.  Note that we don't get it with a
cross-compiler on Linux/x86, but the address is NULL there anyway.

-- 
           Summary: Problem with user operator
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ebotcazou at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc*-*-*
  GCC host triplet: sparc*-*-*
GCC target triplet: sparc*-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17676



More information about the Gcc-bugs mailing list