c++/197: Re: C++ bug in asm() statements
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Tue May 9 12:16:00 GMT 2000
Note: There was a bad value `ice-in-legal-code' for the field `>Class:'.
It was set to the default value of `sw-bug'.
>Number: 197
>Category: c++
>Synopsis: C++ bug in asm() statements
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 09 12:16:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Dave McWherter <davemcw@home.com>
>Release: 2.95.2
>Organization:
>Environment:
>Description:
Original-Message-Id: <4.2.2.20000509085536.00da1dd0@mail>
Date: Tue, 09 May 2000 08:57:16 -0400
The GCC version - 2.95.2
The system type - Windows NT 4.0
All options you passed to the compiler - none
Preprocessed output of the source file that caused the compiler error, even
if the source code can be downloaded from elsewhere - see below
Calling a member function from an asm() statement causes a compiler crash.
build_component_ref() seems to build the COMPONENT_REF incorrectly - the
second operand is incorrect (I think). So later when the asm ops are
expanded, the calculation of 'size_tree' in get_inner_reference() produces
a garbage tree node and a subsequent crash when 'size_tree' is referenced.
The problem does not occur in versions 2.91.66 and lower.
Dave McWherter
dave@franklin.com
# 1 "testasm.cpp"
class myClass
{
public:
int myMember(void);
void call_it(void);
};
void
myClass::call_it(void)
{
asm (
"\t call %0 \n"
:
: "m" (myMember)
);
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list