public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression
       [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
@ 2010-09-26  6:08 ` burnus at gcc dot gnu.org
  2010-09-27 10:05 ` burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-26  6:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-25 22:42:38 UTC ---
Patch for the issue in comment 0:
http://gcc.gnu.org/ml/fortran/2010-09/msg00455.html

TODO: Issue mentioned in comment 1: C_SIZEOF in init expressions.


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

* [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression
       [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
  2010-09-26  6:08 ` [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression burnus at gcc dot gnu.org
@ 2010-09-27 10:05 ` burnus at gcc dot gnu.org
  2010-09-27 10:07 ` [Bug fortran/40568] F2008: " burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-27 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-26 22:30:52 UTC ---
Author: burnus
Date: Sun Sep 26 22:30:48 2010
New Revision: 164639

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164639
Log:
2010-09-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40569
        PR fortran/40568
        * intrinsic.h (gfc_simplify_compiler_options,
        gfc_simplify_compiler_version): New prototypes.
        * intrinsic.c (gfc_intrinsic_function_by_id,
        make_from_module): New functions.
        (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
        gfc_specific_intrinsic): Don't return module intrinsics.
        (add_functions): Add compiler_options, compiler_version.
        (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
        * symbol.c (std_for_isocbinding_symbol): Add version check for
        NAMED_FUNCTIONS.
        * iso-fortran-env.def: Add compiler_options, compiler_version.
        * iso-c-binding.def: Add c_sizeof.
        * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
        (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
        (gfc_intrinsic_function_by_id): New prototype.
        * module.c (create_intrinsic_function): New function.
        (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
        * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
        * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
        by ISYM ID.
        * simplify.c (gfc_simplify_compiler_options,
        gfc_simplify_compiler_version): New functions.

2010-09-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40569
        PR fortran/40568
        * gfortran.dg/storage_size_2.f08: Fix test.
        * gfortran.dg/c_sizeof_1.f90: Fix test.
        * gfortran.dg/c_sizeof_2.f90: Update dg-error.
        * gfortran.dg/c_sizeof_3.f90: New.
        * gfortran.dg/c_sizeof_4.f90: New.
        * gfortran.dg/iso_c_binding_compiler_1.f90: New.
        * gfortran.dg/iso_c_binding_compiler_2.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/c_sizeof_3.f90
    trunk/gcc/testsuite/gfortran.dg/c_sizeof_4.f90
    trunk/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_1.f90
    trunk/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/iso-c-binding.def
    trunk/gcc/fortran/iso-fortran-env.def
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/c_sizeof_1.f90
    trunk/gcc/testsuite/gfortran.dg/c_sizeof_2.f90
    trunk/gcc/testsuite/gfortran.dg/storage_size_2.f08


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

* [Bug fortran/40568] F2008: rejected as initialization expression
       [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
  2010-09-26  6:08 ` [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression burnus at gcc dot gnu.org
  2010-09-27 10:05 ` burnus at gcc dot gnu.org
@ 2010-09-27 10:07 ` burnus at gcc dot gnu.org
  2010-09-28 13:58 ` [Bug fortran/40568] F2008: C_SIZEOF " burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-27 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|F2008: C_SIZEOF is in the   |F2008: rejected as
                   |wrong scope, rejected as    |initialization expression
                   |initialization expression   |

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-26 22:36:14 UTC ---
The bug of comment 0 is fixed - I have thus updated the summary.

TODO: Issue mentioned in comment 1:
- Documentation fixes (cf. .texi part of the patch in attachment 20612)
- Function is CLASS_INQUIRY
- ?


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

* [Bug fortran/40568] F2008: C_SIZEOF rejected as initialization expression
       [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-09-27 10:07 ` [Bug fortran/40568] F2008: " burnus at gcc dot gnu.org
@ 2010-09-28 13:58 ` burnus at gcc dot gnu.org
  2010-09-29  3:03 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-28 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-28 07:44:13 UTC ---
And expr.c's check_inquiry needs to be updated. I think except for some F95 vs.
newer checks, most items should be handled via flags in add_symbol
(intrinsic.c) as one easily forgets to update that file ...


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

* [Bug fortran/40568] F2008: C_SIZEOF rejected as initialization expression
       [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2010-09-28 13:58 ` [Bug fortran/40568] F2008: C_SIZEOF " burnus at gcc dot gnu.org
@ 2010-09-29  3:03 ` burnus at gcc dot gnu.org
  2010-09-29  3:55 ` burnus at gcc dot gnu.org
  2010-09-29  7:47 ` burnus at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-29  3:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-28 19:51:43 UTC ---
Author: burnus
Date: Tue Sep 28 19:51:38 2010
New Revision: 164698

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164698
Log:
gcc/
2010-09-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40569
        PR fortran/40568
        * toplev.h (save_decoded_options, save_decoded_options_count):
        New global variables.
        * toplev.c (save_decoded_options, save_decoded_options_count):
        export variables.

gcc/fortran/
2010-09-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40569
        PR fortran/40568
        * intrinsic.c (add_functions): Make compiler_version and
        compiler_options CLASS_INQUIRY.
        * gfortran.h (gfc_get_option_string): New prototype.
        * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS):
        Add documentation.
        (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING.
        (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS.
        (ISO_C_BINDING): Refer to C_SIZEOF.
        * options.c (gfc_get_option_string): New function.
        * simplify.c (gfc_simplify_compiler_options): Use it.
        (gfc_simplify_compiler_version): Include compiler name.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/toplev.c
    trunk/gcc/toplev.h


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

* [Bug fortran/40568] F2008: C_SIZEOF rejected as initialization expression
       [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2010-09-29  3:03 ` burnus at gcc dot gnu.org
@ 2010-09-29  3:55 ` burnus at gcc dot gnu.org
  2010-09-29  7:47 ` burnus at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-29  3:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-28 19:53:01 UTC ---
Close as FIXED (for 4.6).


Separately tracked follow ups:

For simplify of array valued arguments, cf. PR36437.

For updating check_inquiry, cf. PR 45824.


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

* [Bug fortran/40568] F2008: C_SIZEOF rejected as initialization expression
       [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2010-09-29  3:55 ` burnus at gcc dot gnu.org
@ 2010-09-29  7:47 ` burnus at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-29  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

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

--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-28 19:55:45 UTC ---
Really mark as FIXED.


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

end of thread, other threads:[~2010-09-28 19:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-40568-4@http.gcc.gnu.org/bugzilla/>
2010-09-26  6:08 ` [Bug fortran/40568] F2008: C_SIZEOF is in the wrong scope, rejected as initialization expression burnus at gcc dot gnu.org
2010-09-27 10:05 ` burnus at gcc dot gnu.org
2010-09-27 10:07 ` [Bug fortran/40568] F2008: " burnus at gcc dot gnu.org
2010-09-28 13:58 ` [Bug fortran/40568] F2008: C_SIZEOF " burnus at gcc dot gnu.org
2010-09-29  3:03 ` burnus at gcc dot gnu.org
2010-09-29  3:55 ` burnus at gcc dot gnu.org
2010-09-29  7:47 ` burnus 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).