[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


--- Comment #5 from brooks at gcc dot gnu dot org  2007-03-13 08:11 ---
I believe that all of the nonstandard intrinsics have now been documented in
4.2 and 4.3, and thus I am closing this bug as fixed.


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


--- Comment #6 from brooks at gcc dot gnu dot org  2007-03-13 08:47 ---
This bug was erroneously closed.  The following intrinsics are undocumented in
4.2:

INT2, SHORT
INT8, LONG

MCLOCK
MCLOCK8

SECOND


The relevant bits of intrinsic.c:

  add_sym_1 (int2, ELEMENTAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_GNU,
 gfc_check_intconv, gfc_simplify_int2, gfc_resolve_int2,
 a, BT_REAL, dr, REQUIRED);

  make_alias (short, GFC_STD_GNU);

  make_generic (int2, GFC_ISYM_INT2, GFC_STD_GNU);

  add_sym_1 (int8, ELEMENTAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_GNU,
 gfc_check_intconv, gfc_simplify_int8, gfc_resolve_int8,
 a, BT_REAL, dr, REQUIRED);

  make_generic (int8, GFC_ISYM_INT8, GFC_STD_GNU);

  add_sym_1 (long, ELEMENTAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_GNU,
 gfc_check_intconv, gfc_simplify_long, gfc_resolve_long,
 a, BT_REAL, dr, REQUIRED);

  make_generic (long, GFC_ISYM_LONG, GFC_STD_GNU);

  add_sym_0 (mclock, ELEMENTAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_GNU,
 NULL, NULL, gfc_resolve_mclock);

  make_generic (mclock, GFC_ISYM_MCLOCK, GFC_STD_GNU);

  add_sym_0 (mclock8, ELEMENTAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_GNU,
 NULL, NULL, gfc_resolve_mclock8);

  make_generic (mclock8, GFC_ISYM_MCLOCK8, GFC_STD_GNU);

  add_sym_0 (second, NOT_ELEMENTAL, ACTUAL_NO, BT_REAL, 4, GFC_STD_GNU,
 NULL, NULL, NULL);

  make_generic (second, GFC_ISYM_SECOND, GFC_STD_GNU);


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |brooks at gcc dot gnu dot
   |dot org |org
 Status|REOPENED|ASSIGNED
   Last reconfirmed|2006-06-16 23:51:33 |2007-03-13 08:48:06
   date||


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


--- Comment #7 from brooks at gcc dot gnu dot org  2007-03-13 09:00 ---
Relevant pieces of trans-intrinsic.c:

  /* Integer conversions are handled separately to make sure we get the
 correct rounding mode.  */
case GFC_ISYM_INT:
case GFC_ISYM_INT2:
case GFC_ISYM_INT8:
case GFC_ISYM_LONG:
  gfc_conv_intrinsic_int (se, expr, FIX_TRUNC_EXPR);
  break;

case GFC_ISYM_MCLOCK:
case GFC_ISYM_MCLOCK8:
case GFC_ISYM_SECOND:
  gfc_conv_intrinsic_funcall (se, expr);
  break;

Relevant bits of iresolve.c:

void
gfc_resolve_int2 (gfc_expr * f, gfc_expr * a)
{
  f-ts.type = BT_INTEGER;
  f-ts.kind = 2;

  f-value.function.name =
gfc_get_string (__int_%d_%c%d, f-ts.kind, gfc_type_letter (a-ts.type),
a-ts.kind);
}


void
gfc_resolve_int8 (gfc_expr * f, gfc_expr * a)
{
  f-ts.type = BT_INTEGER;
  f-ts.kind = 8;

  f-value.function.name =
gfc_get_string (__int_%d_%c%d, f-ts.kind, gfc_type_letter (a-ts.type),
a-ts.kind);
}


void
gfc_resolve_long (gfc_expr * f, gfc_expr * a)
{
  f-ts.type = BT_INTEGER;
  f-ts.kind = 4;

  f-value.function.name =
gfc_get_string (__int_%d_%c%d, f-ts.kind, gfc_type_letter (a-ts.type),
a-ts.kind);
}

void
gfc_resolve_mclock (gfc_expr * f)
{
  f-ts.type = BT_INTEGER;
  f-ts.kind = 4;
  f-value.function.name = PREFIX(mclock);
}


void
gfc_resolve_mclock8 (gfc_expr * f)
{
  f-ts.type = BT_INTEGER;
  f-ts.kind = 8;
  f-value.function.name = PREFIX(mclock8);
}

/* G77 compatibility subroutine second().  */

void
gfc_resolve_second_sub (gfc_code * c)
{
  const char *name;

  name = gfc_get_string (PREFIX(second_sub));
  c-resolved_sym = gfc_get_intrinsic_sub_symbol (name);
}

Relevant part of intrinsics/cpu_time.c:

void
second_sub (GFC_REAL_4 *s)
{
  cpu_time_4 (s);
}

extern GFC_REAL_4 second (void);
export_proto(second);

GFC_REAL_4
second (void)
{
  GFC_REAL_4 s;
  cpu_time_4 (s);
  return s;
}

Note that cpu_time_4 is the kind=4 variant of CPU_TIME.


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||brooks at gcc dot gnu dot
   ||org


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


--- Comment #8 from brooks at gcc dot gnu dot org  2007-03-13 09:15 ---
Relevant parts of libgfortran/clock.c:

GFC_INTEGER_4
mclock (void)
{
#ifdef HAVE_CLOCK
  return (GFC_INTEGER_4) clock ();
#else
  return (GFC_INTEGER_4) -1;
#endif
}

GFC_INTEGER_8
mclock8 (void)
{
#ifdef HAVE_CLOCK
  return (GFC_INTEGER_8) clock ();
#else
  return (GFC_INTEGER_8) -1;
#endif


-- 


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


--- Comment #9 from brooks at gcc dot gnu dot org  2007-03-14 02:43 ---
Subject: Bug 28068

Author: brooks
Date: Wed Mar 14 02:43:27 2007
New Revision: 122902

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122902
Log:
PR fortran/28068
* intrinsic.texi: General whitespace cleanup, remove
comment about missing intrinsics.
(menu): Add lines for new entries listed below.
(ACOSH): Mention specific function DACOSH, correct
description phrasing.
(ASINH): Mention specific function DASINH, correct
description phrasing.
(ATANH): Mention specific function DATANH, correct
description phrasing.
(COS): Add index entry for CCOS.
(CPU_TIME): Correct REAL to REAL(*).
(EXP): Add index entry for CEXP.
(INT): Correct argument name to A.
(INT2): New entry.
(INT8): New entry.
(LONG): New entry.
(MAX): Add index entries for specific variants.
(MCLOCK): New entry.
(MCLOCK8): New entry.
(SECNDS): Adjust to a more standard form.
(SECOND): New entry.
(TIME): Add cross-reference to MCLOCK.
(TIME8): Add cross-reference to MCLOCK8.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/intrinsic.texi


-- 


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


--- Comment #10 from brooks at gcc dot gnu dot org  2007-03-14 02:45 ---
Subject: Bug 28068

Author: brooks
Date: Wed Mar 14 02:45:14 2007
New Revision: 122903

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122903
Log:
PR fortran/28068
* intrinsic.texi: General whitespace cleanup, remove
comment about missing intrinsics.
(menu): Add lines for new entries listed below.
(ACOSH): Mention specific function DACOSH, correct
description phrasing.
(ASINH): Mention specific function DASINH, correct
description phrasing.
(ATANH): Mention specific function DATANH, correct
description phrasing.
(COS): Add index entry for CCOS.
(CPU_TIME): Correct REAL to REAL(*).
(EXP): Add index entry for CEXP.
(INT): Correct argument name to A.
(INT2): New entry.
(INT8): New entry.
(LONG): New entry.
(MAX): Add index entries for specific variants.
(MCLOCK): New entry.
(MCLOCK8): New entry.
(SECNDS): Adjust to a more standard form.
(SECOND): New entry.
(TIME): Add cross-reference to MCLOCK.
(TIME8): Add cross-reference to MCLOCK8.

Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/intrinsic.texi


-- 


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2007-03-13 Thread brooks at gcc dot gnu dot org


--- Comment #11 from brooks at gcc dot gnu dot org  2007-03-14 02:46 ---
_Now_ this is fixed on 4.2 and trunk.  :)


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2006-07-28 Thread fxcoudert at gcc dot gnu dot org


--- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-07-28 08:53 
---
(In reply to comment #0)
 It would also be nice to have a compiler parameter to turn off
 non-standard intrinsics.

By the way: the correct option to compile standard code is to use -std=f95.
That will turn off all non-standard things.


-- 


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2006-06-16 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-06-16 23:47 ---
perror is an old g77 intrinsics.


-- 


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2006-06-16 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2006-06-16 23:51 ---
Confirmed.
perror was added by:
2005-03-22  Francois-Xavier Coudert  [EMAIL PROTECTED]

* check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
gfc_check_perror): new functions to check newly implemented
g77 intrinsics.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||fxcoudert at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||documentation
   Last reconfirmed|-00-00 00:00:00 |2006-06-16 23:51:33
   date||


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



[Bug fortran/28068] Non-standard intrinsics should be documented

2006-06-16 Thread kargl at gcc dot gnu dot org


--- Comment #3 from kargl at gcc dot gnu dot org  2006-06-17 02:06 ---
See the first two sentences in Section 8 of gfortran.info.
This is very low hanging fruit, and is placed way below 
fixing actual bugs.


-- 


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