🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #503

bug report for mips.md & g++

#503
From: Dirk Grunwald
Date: Mon, 16 Oct 1989 22:18
62 lines
2241 bytes
I'm having trouble compiling the following code. I'm willing to bash on the
mips.md description some more, but can't see why this instance isn't
covered.

The missing pattern is:
	
	gcc -c test5.cc
	test5.cc: In function int foo (struct bar *, int):
	test5.cc:24: The following insn was not recognizable:
	(insn 32 31 33 (parallel[
	           (set (reg:DF 6)
	               (mem:SF (reg:SI 76)))
	           (clobber (reg:SI 24))
	       ] ) -1 (nil)
	   (nil))

but in mips.md, I have
	(define_insn "movdf"
	  [(set (match_operand:DF 0 "general_operand" "=f,f,m,f,*f,*y")
		(match_operand:DF 1 "general_operand" "f,m,f,F,*y,*f"))
	
and I don't understand why the pattern above isn't matched by
the arg. pair "f" & "m" (i.e. the second pattern). If anyone knows
what pattern *should* match this, I'll implement it.

The code causing this problem follows. This was on a decstation-3100
with the latest version. Note that the first use, passing the coerced
address to a function, doesn't cause the pattern miss, it's only the
second use that does. Any help appreciated.

----------------------------------------------------------------------
#include <stream.h>

typedef struct  {
    float *f;
    double *d;
    long *addr;
} bar;

int
foo(bar *b, int arg)
{
    extern oof(double x);

    oof( *((float*) b[arg].addr) ); 

    cout << *((float*) b[arg].addr);
}


----------------------------------------------------------------------
p.s. I'm also having trouble with missing this pattern. I think it's
related the previous case. Is this so?

(insn 69 68 70 (parallel[ 
           (set (reg:DF 6)
               (mem/s:SF (plus:SI (reg/v/u:SI 64)
                       (const_int 8))))
           (clobber (reg:SI 24))
       ] ) -1 (nil)
   (nil))
Technical Details
Message-ID: <12846@boulder.Colorado.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!ncar!boulder!grunwald

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!ncar!boulder!grunwald
From: grunwald@foobar.colorado.edu (Dirk Grunwald)
Newsgroups: gnu.g++.bug
Subject: bug report for mips.md & g++
Message-ID: <12846@boulder.Colorado.EDU>
Date: 16 Oct 89 22:18:34 GMT
Sender: news@boulder.Colorado.EDU
Reply-To: grunwald@foobar.colorado.edu
Distribution: gnu
Organization: University of Colorado at Boulder
Lines: 62