public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/34477]  New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2
@ 2007-12-15 10:27 ismail at pardus dot org dot tr
  2007-12-15 10:28 ` [Bug middle-end/34477] " ismail at pardus dot org dot tr
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2007-12-15 10:27 UTC (permalink / raw)
  To: gcc-bugs

See the timing, testcase is the usual mktime test from autoconf :

[~]> gcc -O2 -o mktime mktime.c
[~]> time ./mktime
zsh: alarm      ./mktime
./mktime  32,22s user 27,70s system 99% cpu 1:00,00 total

[~]> gcc -o mktime mktime.c
[~]> time ./mktime
./mktime  0,04s user 0,03s system 100% cpu 0,067 total

[~]> gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc/4.3.0
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include
--datadir=/usr/share/gcc/i686-pc-linux-gnu/4.3.0
--mandir=/usr/share/gcc/i686-pc-linux-gnu/4.3.0/man
--infodir=/usr/share/gcc/i686-pc-linux-gnu/4.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-libgcj
--disable-libssp --disable-multilib --disable-nls --disable-werror
--enable-checking=release --enable-clocale=gnu --enable-__cxa_atexit
--enable-languages=c,c++,fortran,objc,obj-c++,treelang
--enable-libstdcxx-allocator=new --enable-shared --enable-ssp
--enable-threads=posix --enable-version-specific-runtime-libs
--without-included-gettext --without-system-libunwind --with-system-zlib
--with-pkgversion='Pardus Linux' --with-bugurl=http://bugs.pardus.org.tr
Thread model: posix
gcc version 4.3.0 20071215 [trunk revision 130952] (Pardus Linux)


-- 
           Summary: [4.3 regression] Standard autoconf mktime test is too
                    slow when compiled with -O2
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ismail at pardus dot org dot tr


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


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

* [Bug middle-end/34477] [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2
  2007-12-15 10:27 [Bug middle-end/34477] New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2 ismail at pardus dot org dot tr
@ 2007-12-15 10:28 ` ismail at pardus dot org dot tr
  2007-12-15 10:30 ` ismail at pardus dot org dot tr
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2007-12-15 10:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ismail at pardus dot org dot tr  2007-12-15 10:27 -------
Created an attachment (id=14766)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14766&action=view)
testcase


-- 


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


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

* [Bug middle-end/34477] [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2
  2007-12-15 10:27 [Bug middle-end/34477] New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2 ismail at pardus dot org dot tr
  2007-12-15 10:28 ` [Bug middle-end/34477] " ismail at pardus dot org dot tr
@ 2007-12-15 10:30 ` ismail at pardus dot org dot tr
  2007-12-15 11:43 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2007-12-15 10:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ismail at pardus dot org dot tr  2007-12-15 10:30 -------
Timings with gcc 3.4.6 :

[~]> gcc -o mktime mktime.c
[~]> time ./mktime

real    0m0.052s
user    0m0.021s

[~]> gcc -O2 -o mktime mktime.c
[~]> time ./mktime

real    0m0.032s
user    0m0.021s
sys     0m0.011s

So this is a regression.


-- 


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


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

* [Bug middle-end/34477] [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2
  2007-12-15 10:27 [Bug middle-end/34477] New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2 ismail at pardus dot org dot tr
  2007-12-15 10:28 ` [Bug middle-end/34477] " ismail at pardus dot org dot tr
  2007-12-15 10:30 ` ismail at pardus dot org dot tr
@ 2007-12-15 11:43 ` pinskia at gcc dot gnu dot org
  2007-12-15 11:46 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-15 11:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-12-15 11:43 -------
Hmm, I think time_t is signed so this is just a case of signed overflow being
undefined.


-- 


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


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

* [Bug middle-end/34477] [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2
  2007-12-15 10:27 [Bug middle-end/34477] New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2 ismail at pardus dot org dot tr
                   ` (2 preceding siblings ...)
  2007-12-15 11:43 ` pinskia at gcc dot gnu dot org
@ 2007-12-15 11:46 ` pinskia at gcc dot gnu dot org
  2007-12-15 11:52 ` ismail at pardus dot org dot tr
  2007-12-15 11:53 ` ismail at pardus dot org dot tr
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-15 11:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-12-15 11:46 -------
Yes this is invalid, time_t is signed so the following loop is empty:

  for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
    continue;


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug middle-end/34477] [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2
  2007-12-15 10:27 [Bug middle-end/34477] New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2 ismail at pardus dot org dot tr
                   ` (3 preceding siblings ...)
  2007-12-15 11:46 ` pinskia at gcc dot gnu dot org
@ 2007-12-15 11:52 ` ismail at pardus dot org dot tr
  2007-12-15 11:53 ` ismail at pardus dot org dot tr
  5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2007-12-15 11:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ismail at pardus dot org dot tr  2007-12-15 11:52 -------
I don't believe this is invalid changing time_t_max and time_t_min to unsigned
long doesn't fix the problem.


-- 


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


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

* [Bug middle-end/34477] [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2
  2007-12-15 10:27 [Bug middle-end/34477] New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2 ismail at pardus dot org dot tr
                   ` (4 preceding siblings ...)
  2007-12-15 11:52 ` ismail at pardus dot org dot tr
@ 2007-12-15 11:53 ` ismail at pardus dot org dot tr
  5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2007-12-15 11:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ismail at pardus dot org dot tr  2007-12-15 11:52 -------
Created an attachment (id=14768)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14768&action=view)
Testcase with unsigned long values


-- 

ismail at pardus dot org dot tr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14766|0                           |1
        is obsolete|                            |


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


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

end of thread, other threads:[~2007-12-15 11:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-15 10:27 [Bug middle-end/34477] New: [4.3 regression] Standard autoconf mktime test is too slow when compiled with -O2 ismail at pardus dot org dot tr
2007-12-15 10:28 ` [Bug middle-end/34477] " ismail at pardus dot org dot tr
2007-12-15 10:30 ` ismail at pardus dot org dot tr
2007-12-15 11:43 ` pinskia at gcc dot gnu dot org
2007-12-15 11:46 ` pinskia at gcc dot gnu dot org
2007-12-15 11:52 ` ismail at pardus dot org dot tr
2007-12-15 11:53 ` ismail at pardus dot org dot tr

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