------- Comment #1 from kargl at gcc dot gnu dot org 2008-07-15 19:03 ------- This would appear to be a middle-end or back-end issue. Given -fdump-tree-original to 4.2.3, one finds
complex_mult_test (iy, ix, nx) { S.4 = 1; while (1) { if (S.4 > ubound.0) goto L.1; else (void) 0; (*iy)[NON_LVALUE_EXPR <S.4> + -1] = (*iy)[NON_LVALUE_EXPR <S.4> + -1] * (*ix)[NON_LVALUE_EXPR <S.4> + -1]; S.4 = S.4 + 1; } If I use 4.4.0, I get complex_mult_test (complex(kind=8)[0:D.1020] * iy, complex(kind=8)[0:D.1017] * ix, integer(kind=4) & nx) { S.4 = 1; while (1) { if (S.4 > ubound.2) goto L.1; (*iy)[S.4 + -1] = (*iy)[S.4 + -1] * (*ix)[S.4 + -1]; S.4 = S.4 + 1; } In either case, gfortran hands the middle-end the complex multiplication. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36840