* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
@ 2004-09-22 3:56 ` pinskia at gcc dot gnu dot org
2004-09-22 19:46 ` jblomqvi at cc dot hut dot fi
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-22 3:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-22 03:56 -------
Confirmed, I thought there was another bug for this but there is not.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-09-22 03:56:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
2004-09-22 3:56 ` [Bug fortran/17590] " pinskia at gcc dot gnu dot org
@ 2004-09-22 19:46 ` jblomqvi at cc dot hut dot fi
2004-09-24 2:56 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: jblomqvi at cc dot hut dot fi @ 2004-09-22 19:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jblomqvi at cc dot hut dot fi 2004-09-22 19:46 -------
Proposed patch here:
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02291.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
2004-09-22 3:56 ` [Bug fortran/17590] " pinskia at gcc dot gnu dot org
2004-09-22 19:46 ` jblomqvi at cc dot hut dot fi
@ 2004-09-24 2:56 ` pinskia at gcc dot gnu dot org
2004-10-29 7:16 ` jblomqvi at cc dot hut dot fi
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-24 2:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-24 02:56 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02291.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (2 preceding siblings ...)
2004-09-24 2:56 ` pinskia at gcc dot gnu dot org
@ 2004-10-29 7:16 ` jblomqvi at cc dot hut dot fi
2004-10-31 1:24 ` cvs-commit at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: jblomqvi at cc dot hut dot fi @ 2004-10-29 7:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jblomqvi at cc dot hut dot fi 2004-10-29 07:16 -------
Here is the revised patch, which for some reason isn't flagged as belonging to
the same thread as the original:
http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00829.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (3 preceding siblings ...)
2004-10-29 7:16 ` jblomqvi at cc dot hut dot fi
@ 2004-10-31 1:24 ` cvs-commit at gcc dot gnu dot org
2004-10-31 4:42 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-31 1:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-31 01:24 -------
Subject: Bug 17590
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pbrook@gcc.gnu.org 2004-10-31 01:24:30
Modified files:
gcc/fortran : ChangeLog gfortran.h intrinsic.c invoke.texi
lang.opt options.c
Log message:
2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR fortran/17590
* gfortran.h: Change GFC_STD_* flags to more appropriate
ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
gfc_option_t): Add field for warning about use of nonstandard
intrinsics.
* intrinsic.c (add_sym): Add parameter for standard version, check
this against current standard.
(add_sym_0): Pass standard parameter to add_sym.
(add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
(add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
(add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
(make_generic): Add parameter for standard, check this
against currently selected standard.
(add_functions, add_subroutines): Add parameter to tell which
standard an intrinsic belongs to.
(check_intrinsic_standard): New function.
(gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
(gfc_intrinsic_sub_interface): Ditto.
* lang.opt: Add Wnonstd-intrinsics option.
* options.c (gfc_init_options): Change to use new GFC_STD_* flags,
init new warning.
(set_Wall): Add warning about nonstd intrinsics.
(gfc_handle_option): Change to use new GFC_STD_* flags,
handle new warning.
* invoke.texi: Update manual to include -Wnonstd-intrinsics.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.244&r2=1.245
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&r1=1.40&r2=1.41
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.c.diff?cvsroot=gcc&r1=1.26&r2=1.27
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/invoke.texi.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/lang.opt.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/options.c.diff?cvsroot=gcc&r1=1.12&r2=1.13
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (4 preceding siblings ...)
2004-10-31 1:24 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-31 4:42 ` pinskia at gcc dot gnu dot org
2004-10-31 13:47 ` jblomqvi at cc dot hut dot fi
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 4:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-31 04:42 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (5 preceding siblings ...)
2004-10-31 4:42 ` pinskia at gcc dot gnu dot org
@ 2004-10-31 13:47 ` jblomqvi at cc dot hut dot fi
2004-10-31 14:52 ` Graham Stott
2004-10-31 14:52 ` graham dot stott at btinternet dot com
` (3 subsequent siblings)
10 siblings, 1 reply; 13+ messages in thread
From: jblomqvi at cc dot hut dot fi @ 2004-10-31 13:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jblomqvi at cc dot hut dot fi 2004-10-31 13:47 -------
I'm reopening this PR since a bug crept in, apparently Paul changed the code to
be C89 conformant while it depended on C99 VLA:s to function properly. If you
look at intrinsic.c:check_intrinsic_standard you see that originally it contained:
int name_len;
name_len = strlen(name);
char msgstr[name_len + 53];
while the committed version has:
int name_len;
char msgstr[name_len + 53];
i.e. msgstr is allocated before the correct length is known. I'll try to fix it
asap with some __builtin_alloca magic..
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-10-31 13:47 ` jblomqvi at cc dot hut dot fi
@ 2004-10-31 14:52 ` Graham Stott
0 siblings, 0 replies; 13+ messages in thread
From: Graham Stott @ 2004-10-31 14:52 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
All,
FWIW here's a quick patch which fixes bootstrap problem for me on i686-pc-linux-gnu.
I've got to go out the door in 5 mins do with as you see fit.
Graham
----------------------------------------------------------------------------------------
Index: intrinsic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/intrinsic.c,v
retrieving revision 1.27
diff -c -p -r1.27 intrinsic.c
*** intrinsic.c 31 Oct 2004 01:24:29 -0000 1.27
--- intrinsic.c 31 Oct 2004 14:46:19 -0000
*************** gfc_init_expr_extensions (gfc_intrinsic_
*** 2672,2687 ****
static void
check_intrinsic_standard (const char *name, int standard)
{
! int name_len;
! char msgstr[name_len + 53];
!
! if (!gfc_option.warn_nonstd_intrinsics)
! return;
!
! name_len = strlen (name);
! strncpy (msgstr, name, name_len + 1);
! strncat (msgstr, " intrinsic is not included in the selected standard.", 53);
! gfc_notify_std (standard, msgstr);
}
--- 2671,2688 ----
static void
check_intrinsic_standard (const char *name, int standard)
{
! if (gfc_option.warn_nonstd_intrinsics)
! {
! static const char err[] = " intrinsic is not included in the selected standard.";
! size_t err_len = sizeof (err);
! size_t name_len = strlen (name);
! char *msgstr = gfc_getmem (name_len + err_len);
!
! memcpy (msgstr, name, name_len);
! memcpy (&msgstr[name_len], err, err_len);
! gfc_notify_std (standard, msgstr);
! gfc_free (msgstr);
! }
}
----------------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (6 preceding siblings ...)
2004-10-31 13:47 ` jblomqvi at cc dot hut dot fi
@ 2004-10-31 14:52 ` graham dot stott at btinternet dot com
2004-10-31 15:22 ` jblomqvi at cc dot hut dot fi
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: graham dot stott at btinternet dot com @ 2004-10-31 14:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From graham dot stott at btinternet dot com 2004-10-31 14:52 -------
Subject: Re: Standard conformance should take intrinsics
into account.
All,
FWIW here's a quick patch which fixes bootstrap problem for me on i686-pc-linux-gnu.
I've got to go out the door in 5 mins do with as you see fit.
Graham
----------------------------------------------------------------------------------------
Index: intrinsic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/intrinsic.c,v
retrieving revision 1.27
diff -c -p -r1.27 intrinsic.c
*** intrinsic.c 31 Oct 2004 01:24:29 -0000 1.27
--- intrinsic.c 31 Oct 2004 14:46:19 -0000
*************** gfc_init_expr_extensions (gfc_intrinsic_
*** 2672,2687 ****
static void
check_intrinsic_standard (const char *name, int standard)
{
! int name_len;
! char msgstr[name_len + 53];
!
! if (!gfc_option.warn_nonstd_intrinsics)
! return;
!
! name_len = strlen (name);
! strncpy (msgstr, name, name_len + 1);
! strncat (msgstr, " intrinsic is not included in the selected standard.", 53);
! gfc_notify_std (standard, msgstr);
}
--- 2671,2688 ----
static void
check_intrinsic_standard (const char *name, int standard)
{
! if (gfc_option.warn_nonstd_intrinsics)
! {
! static const char err[] = " intrinsic is not included in the selected standard.";
! size_t err_len = sizeof (err);
! size_t name_len = strlen (name);
! char *msgstr = gfc_getmem (name_len + err_len);
!
! memcpy (msgstr, name, name_len);
! memcpy (&msgstr[name_len], err, err_len);
! gfc_notify_std (standard, msgstr);
! gfc_free (msgstr);
! }
}
----------------------------------------------------------------------------------------
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (7 preceding siblings ...)
2004-10-31 14:52 ` graham dot stott at btinternet dot com
@ 2004-10-31 15:22 ` jblomqvi at cc dot hut dot fi
2004-11-01 0:46 ` pinskia at gcc dot gnu dot org
2004-11-10 2:25 ` pbrook at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: jblomqvi at cc dot hut dot fi @ 2004-10-31 15:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jblomqvi at cc dot hut dot fi 2004-10-31 15:22 -------
Ok, my patch is here:
http://gcc.gnu.org/ml/gcc-patches/2004-10/msg02748.html
The only major difference compared to Graham's patch is the use of
__builtin_alloca instead of gfc_getmem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (8 preceding siblings ...)
2004-10-31 15:22 ` jblomqvi at cc dot hut dot fi
@ 2004-11-01 0:46 ` pinskia at gcc dot gnu dot org
2004-11-10 2:25 ` pbrook at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-01 0:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-01 00:46 -------
*** Bug 18261 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jim at dishaw dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/17590] Standard conformance should take intrinsics into account.
2004-09-21 18:33 [Bug fortran/17590] New: Standard conformance should take intrinsics into account jblomqvi at cc dot hut dot fi
` (9 preceding siblings ...)
2004-11-01 0:46 ` pinskia at gcc dot gnu dot org
@ 2004-11-10 2:25 ` pbrook at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2004-11-10 2:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pbrook at gcc dot gnu dot org 2004-11-10 02:25 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17590
^ permalink raw reply [flat|nested] 13+ messages in thread