public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/23907] New: missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c?
@ 2005-09-16  0:16 skyhover at hotmail dot com
  2005-09-16  2:02 ` [Bug fortran/23907] " kargl at gcc dot gnu dot org
  2005-09-16  5:46 ` skyhover at hotmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: skyhover at hotmail dot com @ 2005-09-16  0:16 UTC (permalink / raw)
  To: gcc-bugs

We noticed the function has no switch case for "BT_COMPLEX" by similarity check  
against other functions such as "gfc_simplify_range" in the same file. I think 
it's reasonable for a complex to have a radix. So one "case BT_COMPLEX:" may be 
needed just after "case BT_REAL:" at line 2513. Could you please inspect my 
observations? 
 
I also have similar doubts on functions "gfc_simplify_dim", 
"gfc_simplify_huge", "gfc_simplify_sign", and etc. 
 
Thanks a lot.

-- 
           Summary: missing switch-case in function "gfc_simplify_radix" in
                    gcc/fortran/simplify.c?
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: skyhover at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/23907] missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c?
  2005-09-16  0:16 [Bug fortran/23907] New: missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c? skyhover at hotmail dot com
@ 2005-09-16  2:02 ` kargl at gcc dot gnu dot org
  2005-09-16  5:46 ` skyhover at hotmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-09-16  2:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-09-16 02:01 -------
gfc_simplify_radix is used in intrinsic.c for simplification of the
RADIX intrinsic function.  The standard defines RADIX for REAL and
INTEGER.  See 13.14.84.  

program mn
  complex z
  print*, radix(z)
end program mn

kargl[207] gfc41 -static -o z mn.f90
 In file mn.f90:3

  print*, radix(z)
               1
Error: 'x' argument of 'radix' intrinsic at (1) must be INTEGER or REAL

The same holds for gfc_simplify_huge, gfc_simplify_dim, and gfc_simplify_sign.

Please read Chapter 13 of the standard and intrinsic.c

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug fortran/23907] missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c?
  2005-09-16  0:16 [Bug fortran/23907] New: missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c? skyhover at hotmail dot com
  2005-09-16  2:02 ` [Bug fortran/23907] " kargl at gcc dot gnu dot org
@ 2005-09-16  5:46 ` skyhover at hotmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: skyhover at hotmail dot com @ 2005-09-16  5:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From skyhover at hotmail dot com  2005-09-16 05:45 -------
Thanks for your information and clarification. I agree now.

-- 


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


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

end of thread, other threads:[~2005-09-16  5:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-16  0:16 [Bug fortran/23907] New: missing switch-case in function "gfc_simplify_radix" in gcc/fortran/simplify.c? skyhover at hotmail dot com
2005-09-16  2:02 ` [Bug fortran/23907] " kargl at gcc dot gnu dot org
2005-09-16  5:46 ` skyhover at hotmail dot com

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).