Doing parallel byte operations with and's, or's fails to run correctly when using --fugly-logint.
The file below is good example of how a.and.b works differently from and(a,b)
Please compile example with g77 -fugly-logint
gcc version 2.95.1 19990816 (release)/GNU Fortran 0.5.25 19990816 (release)
Linux ibdu 2.2.12-20 #1 Fri Sep 29 07:29:24 EDT 2000 i686 unknown(RedHat 6.1)
Just compile file with -fugly-logint and run to see difference between 2 outputs.
I have no idea, except that .and. should behave as and(.,.) in my opinion. But I am no expert.
State-Changed-Why: Fixed by submitter for 3.2
I have to reopen this bug, because the proposed (and implemented) solution
caused regression (cf. PR fortran/12633).
Created attachment 5211 [details]
This is a modified expr.c that correctly immitates IBM's xlf -qintlog
This should fix the mentionned problem. I had it for a while but forgot to
submit it. Sorry
The Expr.zip attachement above contains a modified expr.c file replacing
This should correctly handle all logical operations and still implements IBM's
It's not the best looking code but it works
Nope, this doesn't fix the test case of PR 12633.
I will look at this asap, and come back with a solution (hopefully).
Assigning who thought he assigned it to himself.
Mark it right as the patch which fixed this caused other problems so it was reverted for
3.3.3 and 3.4.
I posted a potential patch here:
This needs to be examined by somebody more familiar with FORTRAN.
(In reply to comment #11)
> I posted a potential patch here:
> This needs to be examined by somebody more familiar with FORTRAN.
I will compile this and test it and have a look.
Thanks for the patch
Subject: Bug 6491
Module name: gcc
Changes by: firstname.lastname@example.org 2004-01-14 02:32:50
gcc/f : ChangeLog expr.c
* expr.c (ffeexpr_reduce_): When handling AND, OR, and XOR, and
when using -fugly-logint, if both operands are logical, convert
the result back to logical.
(ffeexpr_reduced_ugly2log_): Add bothlogical parameter. Change
all callers. Convert logical operands to integer.
Fixed for 3.4.