Bug 7015 - certain __asm__ constructs rejected
Summary: certain __asm__ constructs rejected
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.1
: P3 normal
Target Milestone: ---
Assignee: Nathan Sidwell
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2002-06-13 04:06 UTC by jbeulich
Modified: 2003-07-25 17:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jbeulich 2002-06-13 04:06:01 UTC
finish_asm_stmt, in its output_operands loop, sets 'operand'
to the same value for all output operands, thus causing
problems with the mark_addressable call at the bottom of the
loop.

Release:
3.1

Environment:
Cross compilers running on Cygwin (Win2K).

How-To-Repeat:
The problem is obvious, and I don't have a specific example
at hand.
Comment 1 jbeulich 2002-06-13 04:06:01 UTC
Fix:
Replace

operand = TREE_VALUE (output_operands);

with

operand = TREE_VALUE (t);
Comment 2 Nathan Sidwell 2002-09-14 14:59:47 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: although obvious, could you provide a test case that I 
    can insert in the testsuite
Comment 3 Nathan Sidwell 2002-09-16 01:15:40 UTC
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-Why: patching
Comment 4 Nathan Sidwell 2002-09-16 01:15:40 UTC
State-Changed-From-To: feedback->analyzed
State-Changed-Why: test case received
Comment 5 Nathan Sidwell 2002-09-16 14:34:02 UTC
From: nathan@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7015
Date: 16 Sep 2002 14:34:02 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	nathan@gcc.gnu.org	2002-09-16 07:34:02
 
 Modified files:
 	gcc/cp         : ChangeLog semantics.c typeck.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/ext: asm3.C 
 
 Log message:
 	cp:
 	2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
 	
 	PR c++/7015
 	* semantic.c (finish_asm_stmt): Fix operand/output_operands
 	thinko.
 	* typeck.c (c_expand_asm_operands): Protect from error_mark_node.
 	testsuite
 	* g++.dg/ext/asm3.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.2958&r2=1.2959
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.276&r2=1.277
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.427&r2=1.428
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2075&r2=1.2076
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/asm3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 
Comment 6 Nathan Sidwell 2002-10-01 12:23:30 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: fixed