public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/4280: Misplaced warnings with optimized `foo / 0.0'
@ 2002-04-02 23:37 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-04-02 23:37 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, h.b.furuseth, nobody

Synopsis: Misplaced warnings with optimized `foo / 0.0'

State-Changed-From-To: open->analyzed
State-Changed-By: rth
State-Changed-When: Tue Apr  2 23:37:20 2002
State-Changed-Why:
    Misplaced warnings produced under simplify_binary_real during
    cse_insn.  We don't have a way to pass down some notion of the
    current insn being considered here, so no way to get hold of 
    the proper line number.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4280


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

* optimization/4280: Misplaced warnings with optimized `foo / 0.0'
@ 2001-09-09 17:16 Hallvard B Furuseth
  0 siblings, 0 replies; 2+ messages in thread
From: Hallvard B Furuseth @ 2001-09-09 17:16 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4280
>Category:       optimization
>Synopsis:       Misplaced warnings with optimized `foo / 0.0'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 09 17:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Hallvard B Furuseth
>Release:        3.0.1
>Organization:
University of Oslo
>Environment:
System: SunOS bombur.uio.no 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

	
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ../gcc-3.0.1/configure --prefix=/usit/bombur/hbf --program-suffix=3 --enable-version-specific-runtime-libs --enable-languages=c --quiet
>Description:
	Warnings `division: NaN - producing operation'
	and `division: function singularity' form optimized code
	get the wrong line numbers.  (The line of the closing
	brace of the end of the function.)

	`gcc -W' produces some correctly placed warnings.

	`gcc -W -O' produces some additional misplaced warnings.
	The warnings which `gcc -W' also produced, are not misplaced.

>How-To-Repeat:
	$ cat a.c
double a, b, c, d, e, f;
void y()
{
  double zero = 0.0;

  /* Misplaced warnings: */
  a = zero / zero;	/* "line 15" NaN */
  b = 0.0  / zero;	/* "line 15" NaN */
  c = zero / 0.0;	/* "line 15" NaN */
  d = 1.0  / zero;	/* "line 15" singularity */

  /* Correctly placed warnings: */
  e = 0.0  / 0.0;	/* line 13  NaN */
  f = 1.0  / 0.0;	/* line 14 singularity */
}			/* line 15 */

/* Correctly placed warnings: */
double g = 0.0 / 0.0;	/* line 18 NaN */
double h = 1.0 / 0.0;	/* line 19 singularity */

	$ gcc3 -W -S a.c
a.c: In function `y':
a.c:13: warning: division: NaN - producing operation
a.c:14: warning: division: function singularity
a.c: At top level:
a.c:18: warning: division: NaN - producing operation
a.c:19: warning: division: function singularity

	$ gcc3 -W -O -S a.c
a.c: In function `y':
a.c:13: warning: division: NaN - producing operation
a.c:14: warning: division: function singularity
a.c:15: warning: division: NaN - producing operation
a.c:15: warning: division: NaN - producing operation
a.c:15: warning: division: NaN - producing operation
a.c:15: warning: division: function singularity
a.c: At top level:
a.c:18: warning: division: NaN - producing operation
a.c:19: warning: division: function singularity
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-04-03  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-02 23:37 optimization/4280: Misplaced warnings with optimized `foo / 0.0' rth
  -- strict thread matches above, loose matches on Subject: below --
2001-09-09 17:16 Hallvard B Furuseth

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).