public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17676] New: Problem with user operator
@ 2004-09-26  8:49 ebotcazou at gcc dot gnu dot org
  2004-09-26 14:01 ` [Bug fortran/17676] " tobi at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-09-26  8:49 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/17676] Problem with user operator
  2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
@ 2004-09-26 14:01 ` tobi at gcc dot gnu dot org
  2004-09-26 14:02 ` tobi at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-26 14:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-09-26 14:01 -------
Created an attachment (id=7220)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7220&action=view)
Putative patch

Try this please. The original code looks like it is a relic from some past time
where operators kept their names in their own namespaces. I don't know if that
time ever existed.

2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	PR fortran/17676
	* resolve.c (resolve_operator): Use correct operator name in message.

-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/17676] Problem with user operator
  2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
  2004-09-26 14:01 ` [Bug fortran/17676] " tobi at gcc dot gnu dot org
@ 2004-09-26 14:02 ` tobi at gcc dot gnu dot org
  2004-09-26 14:02 ` tobi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-26 14:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-26 14:02:15
               date|                            |


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/17676] Problem with user operator
  2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
  2004-09-26 14:01 ` [Bug fortran/17676] " tobi at gcc dot gnu dot org
  2004-09-26 14:02 ` tobi at gcc dot gnu dot org
@ 2004-09-26 14:02 ` tobi at gcc dot gnu dot org
  2004-09-27 14:39 ` ebotcazou at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-26 14:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/17676] Problem with user operator
  2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-09-26 14:02 ` tobi at gcc dot gnu dot org
@ 2004-09-27 14:39 ` ebotcazou at gcc dot gnu dot org
  2004-10-08  0:16 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-09-27 14:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-09-27 14:39 -------
> Try this please. The original code looks like it is a relic from some past time
> where operators kept their names in their own namespaces. I don't know if that
> time ever existed.
> 
> 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
> 
> 	PR fortran/17676
> 	* resolve.c (resolve_operator): Use correct operator name in message.

The patch fixes all the userop.f90 failures.  Thanks for the prompt response!


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/17676] Problem with user operator
  2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-09-27 14:39 ` ebotcazou at gcc dot gnu dot org
@ 2004-10-08  0:16 ` cvs-commit at gcc dot gnu dot org
  2004-10-08  0:18 ` tobi at gcc dot gnu dot org
  2004-10-08  0:22 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-08  0:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-08 00:16 -------
Subject: Bug 17676

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-10-08 00:16:28

Modified files:
	gcc/fortran    : ChangeLog resolve.c 

Log message:
	PR fortran/17676
	* resolve.c (resolve_operator): Use correct operator name in message.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.232&r2=1.233
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&r1=1.19&r2=1.20



-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/17676] Problem with user operator
  2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-10-08  0:16 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-08  0:18 ` tobi at gcc dot gnu dot org
  2004-10-08  0:22 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-08  0:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-10-08 00:18 -------
Sorry, I forgot to actually submit this patch :( Applied as obvious after
re-testing. Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/17676] Problem with user operator
  2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-10-08  0:18 ` tobi at gcc dot gnu dot org
@ 2004-10-08  0:22 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08  0:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-08  0:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-26  8:49 [Bug fortran/17676] New: Problem with user operator ebotcazou at gcc dot gnu dot org
2004-09-26 14:01 ` [Bug fortran/17676] " tobi at gcc dot gnu dot org
2004-09-26 14:02 ` tobi at gcc dot gnu dot org
2004-09-26 14:02 ` tobi at gcc dot gnu dot org
2004-09-27 14:39 ` ebotcazou at gcc dot gnu dot org
2004-10-08  0:16 ` cvs-commit at gcc dot gnu dot org
2004-10-08  0:18 ` tobi at gcc dot gnu dot org
2004-10-08  0:22 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).