public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/51522] ICE in gfortran 4.6.2, x86_64
Date: Tue, 31 Jan 2012 16:11:00 -0000	[thread overview]
Message-ID: <bug-51522-4-W4vRtvxp5o@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51522-4@http.gcc.gnu.org/bugzilla/>

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |jb at gcc dot gnu.org
         Resolution|FIXED                       |

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-31 15:52:19 UTC ---
Revision 183681 

Author:    jb
Date:    Sun Jan 29 20:29:50 2012 UTC (43 hours, 17 minutes ago)
Changed paths:    2
Log Message:    
Reduce size of pointer_info tree, minor cleanups.

2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>

    * module.c (pointer_info): Make true_name and module pointers
    rather than arrays, order pointers before other fields.
    (free_pi_tree): free true_name and module as well.
    (mio_read_string): Rename to read_string.
    (mio_write_string): Remove.
    (load_commons): Use read_string.
    (read_module): Use read_string rather than mio_internal_string.
    (write_blank_common): Call write_atom directly.
    (write_symbol): Likewise.

gives again an ICE for the test case and the reduced one below. Since I see in
comment #2:

> With the patch for PR 51578 (for GCC 4.7), the ICE is fixed. For the lines ...

I cannot decide if the bug has been really fixed or only hidden, so I reopen
the PR.

Revision 183680 does not give any ICE

[macbook] f90/bug% /opt/gcc/gcc4.7p-183680/bin/gfortran  -w pr51522_red.f90
pr51522_red.f90:94.10:

  integer(c_int) function vect_Utils_vuTriIneqHolds_c(u, v, tol, exception)   
&
          1
Error: Parameter 'c_int' at (1) has not been declared or is a variable, which
does not reduce to a constant expression
pr51522_red.f90:96.7:

  real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind
       1
Error: Parameter 'c_double' at (1) has not been declared or is a variable,
which does not reduce to a constant expression

while r183681 does

[macbook] f90/bug% /opt/gcc/gcc4.7p-183681/bin/gfortran -w pr51522_red.f90
pr51522_red.f90:94.10:

  integer(c_int) function vect_Utils_vuTriIneqHolds_c(u, v, tol, exception)   
&
          1
Error: Parameter 'c_int' at (1) has not been declared or is a variable, which
does not reduce to a constant expression
pr51522_red.f90:96.7:

  real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind
       1
Error: Parameter 'c_double' at (1) has not been declared or is a variable,
which does not reduce to a constant expression
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This is how much I can reduce the original test. Commenting any line in the
first two derived types make the ICE to go away (I lost patience after that;-).
Also trying to avoid the ton of warnings by defining the arguments in the last
interface block makes the ICE to go away.

module vect_Utils_type_F03
  use, intrinsic :: iso_c_binding
  type, bind(c) :: vect_Utils_sepv_t
    type(c_funptr) :: f__set_hooks_static
    type(c_funptr) :: f__set_contracts_static
    type(c_funptr) :: f__dump_stats_static
    type(c_funptr) :: f_vuIsZero
    type(c_funptr) :: f_vuIsUnit
    type(c_funptr) :: f_vuAreEqual
    type(c_funptr) :: f_vuAreOrth
    type(c_funptr) :: f_vuSchwarzHolds
    type(c_funptr) :: f_vuTriIneqHolds
    type(c_funptr) :: f_vuDot
    type(c_funptr) :: f_vuProduct
    type(c_funptr) :: f_vuNegate
    type(c_funptr) :: f_vuNormalize
    type(c_funptr) :: f_vuSum
    type(c_funptr) :: f_vuDiff
  end type
  type, bind(c) :: vect_Utils_epv_t
    type(c_funptr) :: f__cast
    type(c_funptr) :: f__delete
    type(c_funptr) :: f__exec
    type(c_funptr) :: f__getURL
    type(c_funptr) :: f__raddRef
    type(c_funptr) :: f__isRemote
    type(c_funptr) :: f__set_hooks
    type(c_funptr) :: f__set_contracts
    type(c_funptr) :: f__dump_stats
    type(c_funptr) :: f__ctor
    type(c_funptr) :: f__ctor2
    type(c_funptr) :: f__dtor
    type(c_funptr) :: f__load
    type(c_funptr) :: f_addRef
    type(c_funptr) :: f_deleteRef
    type(c_funptr) :: f_isSame
    type(c_funptr) :: f_isType
    type(c_funptr) :: f_getClassInfo
  end type
  type, bind(c) :: vect_Utils_pre_epv_t
    integer(c_int) :: avoid_empty_type
  end type
  type, bind(c) :: vect_Utils_post_sepv_t
    type(c_funptr) :: f_vuIsUnit_post
    type(c_funptr) :: f_vuAreEqual_post
    type(c_funptr) :: f_vuAreOrth_post
    type(c_funptr) :: f_vuSchwarzHolds_post
    type(c_funptr) :: f_vuTriIneqHolds_post
    type(c_funptr) :: f_vuNorm_post
    type(c_funptr) :: f_vuDot_post
    type(c_funptr) :: f_vuProduct_post
    type(c_funptr) :: f_vuNegate_post
    type(c_funptr) :: f_vuNormalize_post
    type(c_funptr) :: f_vuSum_post
    type(c_funptr) :: f_vuDiff_post
  end type
  type, bind(c) :: vect_Utils_pre_sepv_t
    type(c_funptr) :: f_vuIsZero_pre
    type(c_funptr) :: f_vuIsUnit_pre
    type(c_funptr) :: f_vuAreEqual_pre
    type(c_funptr) :: f_vuAreOrth_pre
    type(c_funptr) :: f_vuSchwarzHolds_pre
    type(c_funptr) :: f_vuTriIneqHolds_pre
    type(c_funptr) :: f_vuNorm_pre
    type(c_funptr) :: f_vuDot_pre
    type(c_funptr) :: f_vuProduct_pre
    type(c_funptr) :: f_vuNegate_pre
    type(c_funptr) :: f_vuNormalize_pre
    type(c_funptr) :: f_vuSum_pre
    type(c_funptr) :: f_vuDiff_pre
  end type
  type vect_Utils_t
    type(c_ptr) :: d_ior = c_null_ptr
    type(vect_Utils_epv_t), pointer :: d_epv => null()
  end type vect_Utils_t
  interface cache_epv
    module procedure cache_epv_s
  end interface cache_epv
contains
    subroutine cache_epv_s(self)
      implicit none
      class(vect_Utils_t) :: self
    end subroutine cache_epv_s
end module vect_Utils_type_F03
module vect_Utils_F03
  use vect_Utils_type_F03
interface
  type(c_ptr) function get_sepv_c() bind(c, name="vect_Utils_getSEPV")
  use, intrinsic :: iso_c_binding
  end function get_sepv_c
  integer(c_int) function vect_Utils_vuIsUnit_c(u, tol, exception) bind(c)
    use, intrinsic :: iso_c_binding
  end function vect_Utils_vuIsUnit_c
  integer(c_int) function vect_Utils_vuTriIneqHolds_c(u, v, tol, exception)   
&
    use, intrinsic :: iso_c_binding
  real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception)
bind(c)
  end function vect_Utils_vuNorm_c
end interface
end module vect_Utils_F03


  parent reply	other threads:[~2012-01-31 15:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 23:09 [Bug fortran/51522] New: " adrian at llnl dot gov
2011-12-12 23:25 ` [Bug fortran/51522] " dominiq at lps dot ens.fr
2012-01-09 13:30 ` burnus at gcc dot gnu.org
2012-01-09 13:40 ` dominiq at lps dot ens.fr
2012-01-31 16:11 ` dominiq at lps dot ens.fr [this message]
2012-02-02 19:08 ` jb at gcc dot gnu.org
2012-02-03 10:50 ` burnus at gcc dot gnu.org
2012-02-03 22:36 ` jb at gcc dot gnu.org
2012-02-04  0:20 ` dominiq at lps dot ens.fr
2012-02-05 21:04 ` jb at gcc dot gnu.org
2015-10-10 12:57 ` dominiq at lps dot ens.fr

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=bug-51522-4-W4vRtvxp5o@http.gcc.gnu.org/bugzilla/ \
    --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).