This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/21931] problem with fugly-logint flag and evaluating if statements
- From: "mark_l_hansen at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2005 02:08:02 -0000
- Subject: [Bug fortran/21931] problem with fugly-logint flag and evaluating if statements
- References: <20050606154812.21931.mark_l_hansen@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mark_l_hansen at yahoo dot com 2005-06-29 02:08 -------
I did some more research on the bug and found the following:
1) in fortran .TRUE. is 0x1 in hex
2) if(item) statements evaluate to true when the item value is non zero
3) .NOT., .AND., etc either perform bitwise or logical operations depending on
what they are operating on.
The problem occurs when doing bitwise operations and then doing a logical if
check with the -fugly-logint flag. For example: 0xFF .AND. 0x02 = 0x02 i.e.
True, but .NOT.(0xFF .AND. 0x02) = 0xFD i.e. also true when the desired result
is false.
I know the above might all be already understood, but I thought it might help if
others are looking into the problems.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21931