public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54656] New: ICE with software REAL(16) for NORM2
@ 2012-09-21 13:55 burnus at gcc dot gnu.org
  2012-09-21 13:58 ` [Bug fortran/54656] " dominiq at lps dot ens.fr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-09-21 13:55 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54656
           Summary: ICE with software REAL(16) for NORM2
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: jdelia@intec.unl.edu.ar


Reported by Jorge D'ELIA at http://gcc.gnu.org/ml/fortran/2012-09/msg00075.html

  program test79
    implicit none
    real(16) :: d(10), z
    d = 1
    z = norm2 (d)  ! ICE (segfault)
  end program test79



The problem is the following code in trans-intrinsic.c's
gfc_conv_intrinsic_arith:

  if (norm2)
    {
      /* result = scale * sqrt(result).  */
      tree sqrt;
      sqrt = gfc_builtin_decl_for_float_kind (BUILT_IN_SQRT, expr->ts.kind);

as sqrt == NULL_TREE.

Seemingly, the proper way to call the quad functions is to use
gfc_conv_intrinsic_lib_function.

Only a small subset gets a decl and is thus available in the struct
gfc_intrinsic_map, which is accessed in gfc_builtin_decl_for_float_kind.

The struct gets set gfc_build_intrinsic_lib_fndecls, but that only handles
OTHER_BUILTIN - and not DEFINE_MATH_BUILTIN_C, which is needed for SQRT.


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

end of thread, other threads:[~2015-08-16 19:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-21 13:55 [Bug fortran/54656] New: ICE with software REAL(16) for NORM2 burnus at gcc dot gnu.org
2012-09-21 13:58 ` [Bug fortran/54656] " dominiq at lps dot ens.fr
2013-10-26  4:28 ` burnus at gcc dot gnu.org
2015-08-16 19:32 ` fxcoudert at gcc dot gnu.org
2015-08-16 19:47 ` fxcoudert at gcc dot gnu.org
2015-08-16 19:51 ` fxcoudert 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).