This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/25073] CASEs overlap



------- Comment #9 from paul dot richard dot thomas at cea dot fr  2006-06-22 14:31 -------

> A straightforward fix in resolve.c (resolve_select).

In checking the attachment, I have just seen that the if condition can be
simplified to

              if (cp->low->value.logical & seen_logical)
                {
                  gfc_error ("constant logical value in CASE statement "
                             "is repeated at %L",
                             &cp->low->where);
                  t = FAILURE;
                  break;
                }
              seen_logical |= cp->low->value.logical == 0 ? 2 : 1;

Paul


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]