public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/54040] New: [x32] Incorrect timeval and timespec
@ 2012-07-19 23:37 hjl.tools at gmail dot com
  2013-11-13 20:33 ` [Bug ada/54040] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-19 23:37 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54040
           Summary: [x32] Incorrect timeval and timespec
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


X32 has

/* A time value that is accurate to the nearest
   microsecond but also has a range of years.  */
struct timeval
  {
    __time_t tv_sec;            /* Seconds.  */
    __suseconds_t tv_usec;      /* Microseconds.  */
  };  

and

struct timespec
  {
    __time_t tv_sec;            /* Seconds.  */
    __syscall_slong_t tv_nsec;  /* Nanoseconds.  */
  };

__time_t, __suseconds_t and __syscall_slong_t are 64-bit integers
in x32. But ada run-time assumes all of them are long, which is
32-bit for x32.


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

* [Bug ada/54040] [x32] Incorrect timeval and timespec
  2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
@ 2013-11-13 20:33 ` hjl.tools at gmail dot com
  2013-11-13 20:43 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-13 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-13
   Target Milestone|---                         |4.9.0
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01504.html


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

* [Bug ada/54040] [x32] Incorrect timeval and timespec
  2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
  2013-11-13 20:33 ` [Bug ada/54040] " hjl.tools at gmail dot com
@ 2013-11-13 20:43 ` hjl.tools at gmail dot com
  2013-11-15 12:06 ` hjl at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-13 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Without the fix, many Ada tests fail with timeout:

FAIL: gnat.dg/curr_task.adb execution test
FAIL: gnat.dg/interface2.adb execution test
FAIL: gnat.dg/lto8.adb execution test
FAIL: gnat.dg/null_pointer_deref2.adb execution test
FAIL: gnat.dg/requeue1.adb execution test
FAIL: gnat.dg/stack_check1.adb execution test
FAIL: gnat.dg/stack_check2.adb execution test
FAIL: gnat.dg/task_stack_align.adb execution test
FAIL: gnat.dg/test_image.adb execution test
FAIL: gnat.dg/test_prio.adb execution test
FAIL: gnat.dg/timer_cancel.adb execution test


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

* [Bug ada/54040] [x32] Incorrect timeval and timespec
  2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
  2013-11-13 20:33 ` [Bug ada/54040] " hjl.tools at gmail dot com
  2013-11-13 20:43 ` hjl.tools at gmail dot com
@ 2013-11-15 12:06 ` hjl at gcc dot gnu.org
  2013-11-29 16:19 ` ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu.org @ 2013-11-15 12:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Fri Nov 15 12:06:25 2013
New Revision: 204840

URL: http://gcc.gnu.org/viewcvs?rev=204840&root=gcc&view=rev
Log:
Add and use System.Linux.time_t for time_t

    PR ada/54040
    * s-linux-x32.ads: New file.
    * s-osprim-x32.adb: Likewise.
    * s-linux.ads (time_t): New type.
    * s-linux-alpha.ads (time_t):  Likewise.
    * s-linux-hppa.ads (time_t):  Likewise.
    * s-linux-mipsel.ads (time_t):  Likewise.
    * s-linux-sparc.ads (time_t):  Likewise.
    * s-osinte-linux.ads (time_t): Mark it private.  Replace long
    with System.Linux.time_t.
    (timespec): Replace long with time_t.
    * s-osinte-posix.adb (To_Timespec): Likewise.
    * s-taprop-linux.adb (timeval): Replace C.long with
    System.OS_Interface.time_t.
    * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Replace
    s-linux.ads with s-linux-x32.ads, s-osprim-posix.adb with
    s-osprim-x32.adb for x32.

Added:
    trunk/gcc/ada/s-linux-x32.ads
    trunk/gcc/ada/s-osprim-x32.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/Makefile.in
    trunk/gcc/ada/s-linux-alpha.ads
    trunk/gcc/ada/s-linux-hppa.ads
    trunk/gcc/ada/s-linux-mipsel.ads
    trunk/gcc/ada/s-linux-sparc.ads
    trunk/gcc/ada/s-linux.ads
    trunk/gcc/ada/s-osinte-linux.ads
    trunk/gcc/ada/s-osinte-posix.adb
    trunk/gcc/ada/s-taprop-linux.adb


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

* [Bug ada/54040] [x32] Incorrect timeval and timespec
  2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2013-11-15 12:06 ` hjl at gcc dot gnu.org
@ 2013-11-29 16:19 ` ebotcazou at gcc dot gnu.org
  2014-02-22  8:39 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-11-29 16:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Author: ebotcazou
Date: Fri Nov 29 16:19:36 2013
New Revision: 205532

URL: http://gcc.gnu.org/viewcvs?rev=205532&root=gcc&view=rev
Log:
    PR ada/54040
    PR ada/59346
    * s-osinte-hpux.ads (timespec): Change type of tv_nsec field to time_t.
    * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
    * s-osinte-solaris-posix.ads (timespec): Likewise.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/s-osinte-hpux.ads
    trunk/gcc/ada/s-osinte-kfreebsd-gnu.ads
    trunk/gcc/ada/s-osinte-solaris-posix.ads


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

* [Bug ada/54040] [x32] Incorrect timeval and timespec
  2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2013-11-29 16:19 ` ebotcazou at gcc dot gnu.org
@ 2014-02-22  8:39 ` ebotcazou at gcc dot gnu.org
  2014-04-09 14:55 ` ebotcazou at gcc dot gnu.org
  2014-04-09 23:19 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-02-22  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

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

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
.


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

* [Bug ada/54040] [x32] Incorrect timeval and timespec
  2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2014-02-22  8:39 ` ebotcazou at gcc dot gnu.org
@ 2014-04-09 14:55 ` ebotcazou at gcc dot gnu.org
  2014-04-09 23:19 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-04-09 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Author: ebotcazou
Date: Wed Apr  9 14:54:29 2014
New Revision: 209244

URL: http://gcc.gnu.org/viewcvs?rev=209244&root=gcc&view=rev
Log:
    PR ada/54040
    PR ada/59346
    * s-osinte-x32.adb: New file.
    * s-linux.ads (Time): New section.
    * s-linux-alpha.ads (Time): Likewise.
    * s-linux-android.ads (Time: Likewise.
    * s-linux-hppa.ads (Time): Likewise.
    * s-linux-mipsel.ads (Time): Likewise.
    * s-linux-sparc.ads (Time): Likewise.
    * s-linux-x32.ads (Time): Likewise.
    * s-osprim-x32.ads (timespec): Adjust.
    * s-osinte-linux.ads (Time): Define local subtypes for those defined
    in System.Linux.
    * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
    * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
    * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
    * s-osinte-solaris-posix.ads (timespec): Likewise.
    * s-osinte-posix.adb (To_Timespec): Likewise.
    * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.

Added:
    trunk/gcc/ada/s-osinte-x32.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/Makefile.in
    trunk/gcc/ada/s-linux-alpha.ads
    trunk/gcc/ada/s-linux-android.ads
    trunk/gcc/ada/s-linux-hppa.ads
    trunk/gcc/ada/s-linux-mipsel.ads
    trunk/gcc/ada/s-linux-sparc.ads
    trunk/gcc/ada/s-linux-x32.ads
    trunk/gcc/ada/s-linux.ads
    trunk/gcc/ada/s-osinte-hpux.ads
    trunk/gcc/ada/s-osinte-kfreebsd-gnu.ads
    trunk/gcc/ada/s-osinte-linux.ads
    trunk/gcc/ada/s-osinte-posix.adb
    trunk/gcc/ada/s-osinte-solaris-posix.ads
    trunk/gcc/ada/s-osprim-x32.adb
    trunk/gcc/ada/s-taprop-linux.adb


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

* [Bug ada/54040] [x32] Incorrect timeval and timespec
  2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2014-04-09 14:55 ` ebotcazou at gcc dot gnu.org
@ 2014-04-09 23:19 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-04-09 23:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Author: ebotcazou
Date: Wed Apr  9 23:18:28 2014
New Revision: 209257

URL: http://gcc.gnu.org/viewcvs?rev=209257&root=gcc&view=rev
Log:
    PR ada/54040
    PR ada/59346
    * s-osinte-x32.adb (To_Timespec): Add use directive.
    * s-osprim-x32.ads (Clock): Adjust.
    (To_Timespec): Likewise.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/s-osinte-x32.adb
    trunk/gcc/ada/s-osprim-x32.adb


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

end of thread, other threads:[~2014-04-09 23:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19 23:37 [Bug ada/54040] New: [x32] Incorrect timeval and timespec hjl.tools at gmail dot com
2013-11-13 20:33 ` [Bug ada/54040] " hjl.tools at gmail dot com
2013-11-13 20:43 ` hjl.tools at gmail dot com
2013-11-15 12:06 ` hjl at gcc dot gnu.org
2013-11-29 16:19 ` ebotcazou at gcc dot gnu.org
2014-02-22  8:39 ` ebotcazou at gcc dot gnu.org
2014-04-09 14:55 ` ebotcazou at gcc dot gnu.org
2014-04-09 23:19 ` ebotcazou 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).