From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16795 invoked by alias); 22 Feb 2007 03:16:25 -0000 Received: (qmail 16767 invoked by uid 48); 22 Feb 2007 03:16:13 -0000 Date: Thu, 22 Feb 2007 03:16:00 -0000 Message-ID: <20070222031613.16766.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/30877] overloading "operator(*)" for intrinsic type (complex) fails In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ben_ship at lycos dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-02/txt/msg02534.txt.bz2 ------- Comment #4 from ben_ship at lycos dot com 2007-02-22 03:16 ------- This might actually be a more general issue with operator overloading. In this example the overloading of an operator that works on two different shaped operands of intrinsic types is not allowed. At the same time there is no know conflicting operator (*) for generating the product "a*b" and you cannot define one without either - changing "COMPLEX" to some derived type with complex elements, therefore removing the type issue. - replacing "*" with some user defined operator, e.g.".times.", rather than overloading. (but then precedence is an issue) I think it is a little unusual that COMPLEX is used rather than some derived type. However, ifort and g95 will compile this code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30877