This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25073] CASEs overlap
- From: "paul dot richard dot thomas at cea dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2006 14:31:02 -0000
- Subject: [Bug fortran/25073] CASEs overlap
- References: <bug-25073-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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