public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103323] New: Front end simplifies sin although no header included
@ 2021-11-18 20:29 tkoenig at gcc dot gnu.org
  2021-11-18 20:39 ` [Bug c/103323] " pinskia at gcc dot gnu.org
  2021-11-18 21:20 ` tkoenig at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-11-18 20:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103323

            Bug ID: 103323
           Summary: Front end simplifies sin although no header included
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

$ cat a.c
double 
sin(double x) {
  return x/2 + x;
}

double
foo(double x) {
  return 1 - sin(-x);
}
$ gcc -S -fdump-tree-original a.c 
$ cat a.c.005t.original 

;; Function sin (null)
;; enabled by -tree-original


{
  return x / 2.0e+0 + x;
}


;; Function foo (null)
;; enabled by -tree-original


{
  return sin (x) + 1.0e+0;
}

$ gcc -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ig25/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Ziel: x86_64-pc-linux-gnu
Konfiguriert mit: ../trunk/configure --prefix=/home/ig25
--enable-languages=c,c++,fortran --enable-maintainer-mode
Thread-Modell: posix
Unterstützte LTO-Kompressionsalgorithmen: zlib
gcc-Version 12.0.0 20211116 (experimental) [master revision
e87559d202d:f4e6da6e8ac:36ec54aac7da134441c83248e14825381b8d6f17] (GCC) 

The sin(x) in the tree dump should be sin(-x).

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

end of thread, other threads:[~2021-11-18 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 20:29 [Bug c/103323] New: Front end simplifies sin although no header included tkoenig at gcc dot gnu.org
2021-11-18 20:39 ` [Bug c/103323] " pinskia at gcc dot gnu.org
2021-11-18 21:20 ` tkoenig at gcc dot gnu.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).