public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/40569] F2008: Support COMPILER_OPTIONS() / COMPILER_VERSION()
Date: Sat, 25 Sep 2010 15:33:00 -0000	[thread overview]
Message-ID: <20100925153300.NFbl2yzpbv3HbqIA3KKyRx-88XeaLa5wxLNah3nlePM@z> (raw)
In-Reply-To: <bug-40569-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-25 12:34:38 UTC ---
First part of an implementation.

TODO: (a) Use a module rather than the normal name space. (b) Get the command
line options; cf. http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02006.html

--- intrinsic.c (Revision 164618)
+++ intrinsic.c (Arbeitskopie)
@@ -2613,0 +2615,6 @@ add_functions (void)
+
+/* MOVE TO MODULE: ISO_FORTRAN_ENV.  */
+  add_sym_0 ("compiler_options", GFC_ISYM_COMPILER_VERSION, CLASS_IMPURE,
ACTUAL_NO, BT_CHARACTER,
+            1, GFC_STD_F2008, NULL, gfc_simplify_compiler_options, NULL);
+  add_sym_0 ("compiler_version", GFC_ISYM_COMPILER_VERSION, CLASS_IMPURE,
ACTUAL_NO, BT_CHARACTER,
+            1, GFC_STD_F2008, NULL, gfc_simplify_compiler_version, NULL);
--- simplify.c  (Revision 164618)
+++ simplify.c
@@ -29,2 +29,3 @@ along with GCC; see the file COPYING3.
 #include "constructor.h"
+#include "version.h"  /* For version_string.  */

@@ -6735 +6736,17 @@ gfc_convert_char_constant (gfc_expr *e,
 }
+
+
+gfc_expr *
+gfc_simplify_compiler_options (void)
+{
+  return NULL;
+}
+
+
+gfc_expr *
+gfc_simplify_compiler_version (void)
+{
+  return gfc_get_character_expr (gfc_default_character_kind,
+                                &gfc_current_locus, version_string,
+                                strlen (version_string));
+}

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


       reply	other threads:[~2010-09-25 12:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-40569-4@http.gcc.gnu.org/bugzilla/>
2010-09-25 15:33 ` burnus at gcc dot gnu.org [this message]
2010-09-26  7:33 ` burnus at gcc dot gnu.org
2010-09-27  9:42 ` burnus at gcc dot gnu.org
2010-09-27 10:25 ` burnus at gcc dot gnu.org
2010-09-27 10:28 ` burnus at gcc dot gnu.org
2010-09-27 11:08 ` burnus at gcc dot gnu.org
2010-09-28 14:03 ` Joost.VandeVondele at pci dot uzh.ch
2010-09-29  2:56 ` burnus at gcc dot gnu.org
2010-09-29  3:33 ` burnus at gcc dot gnu.org
2010-09-29  7:40 ` burnus at gcc dot gnu.org
2009-06-27 16:16 [Bug fortran/40569] New: " burnus at gcc dot gnu dot org
2009-06-27 19:44 ` [Bug fortran/40569] " burnus at gcc dot gnu dot org
2009-07-05  9:16 ` fxcoudert at gcc dot gnu dot org
2009-07-05  9:16 ` fxcoudert at gcc dot gnu dot org
2010-06-23 16:46 ` burnus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100925153300.NFbl2yzpbv3HbqIA3KKyRx-88XeaLa5wxLNah3nlePM@z \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).