Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26924 - GCC3.2 fails to compile source with inline assembly.
Summary: GCC3.2 fails to compile source with inline assembly.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
: 26923 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-19 06:12 UTC by nightelf
Modified: 2003-10-02 20:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Error messaged outputted by GCC (gccerror.txt,243 bytes, text/plain)
2003-08-19 06:13 UTC, nightelf
Details
Strace of GCC compile (strace.txt,6.28 KB, text/plain)
2003-08-19 06:14 UTC, nightelf
Details
Source file trying to compile (inline.c,244 bytes, application/octet-stream)
2003-08-19 06:14 UTC, nightelf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nightelf 2003-08-19 06:12:49 UTC
When I try to compile a source file with inline assembly in it, I receive an error message indicating an internal error and advised to submit a bug report. 

Reproducible: Always
Steps to Reproduce:

1. In a console, I tried to compile the source file without any switches i.e. gcc inline.c
2.
3.

Actual Results:  
Source doesn't compile and I get an error message

Expected Results:  
The output of a compiled binary

Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.21 i686 AMD Athlon(TM) XP 1800+
GENTOO_MIRRORS="http://mirror.3fl.net/pub/gentoo rsync://203.16.234.20/gentoo/ ftp://203.16.234.20/pub/gentoo/ ftp://203.16.234.19/pub/gentoo/ http://203.16.234.19/pub/gentoo/ http://203.16.234.20/pub/gentoo/ http://www.ibiblio.org/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="foomaticdb libg++ mad mikmod nls quicktime xml2 xv readline tetex tcltk sdl libwww python imlib motif mozilla radeon -sis -rage128 -i8x0 -matrox -gamma -3dfx 3dnow sse -acl -afs -apm -atlas X gtk -kde -qt -gnome -arts alsa avi -berkdb -bonobo -canna -cdr -cjk crypt cups -dga -directfb -doc dvd encode -esd -evo fbcon -flash -freewnn -gb gd gdbm -ggi -ggz -gphoto2 gpm gtk2 -gtkhtml -guile -innodb -junit imap ncurses java jikes -ldap -leim -mysql -mule -nas -nocardbus -oci8 -pcmcia -pda -plotutils opengl oggvorbis -oss pdflib perl png -ruby -scanner -slang sasl spell -voodoo3 -trusted -wavelan -zeo -ppc -sparc -sparc64 -alpha tcpd xmms x86 gif ipv6 jpeg kerberos mbox mmx mpeg pam ssl svga truetype zlib qt31patch"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -fforce-addr -falign-functions=4"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -fforce-addr -falign-functions=4"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="ccache buildpkg sandbox"
Comment 1 nightelf 2003-08-19 06:13:37 UTC
Created attachment 16316 [details]
Error messaged outputted by GCC
Comment 2 nightelf 2003-08-19 06:14:12 UTC
Created attachment 16317 [details]
Strace of GCC compile
Comment 3 nightelf 2003-08-19 06:14:46 UTC
Created attachment 16318 [details]
Source file trying to compile
Comment 4 Patrick Kursawe (RETIRED) gentoo-dev 2003-08-19 07:25:25 UTC
*** Bug 26923 has been marked as a duplicate of this bug. ***
Comment 5 Joshua Kinard gentoo-dev 2003-10-01 22:43:06 UTC
Could you please provide the name of the package that produced this error?

I attempted to compile the inline assembler source file you provided, but
I get a different error than what your posted error shows.
Comment 6 nightelf 2003-10-02 00:31:31 UTC
 All I used is gcc, package: sys-devel/gcc-3.2.3-r1. If it's due to some
other package (glibc etc.) I wouldn't know.

If this isn't the info you needed let me know

Comment 7 Joshua Kinard gentoo-dev 2003-10-02 10:36:00 UTC
I mean, can you provide the name of a package that has inline assembly in
it that you attempted to compile and thus generated the failure.  Or did
you attempt to compile a package (or source file) outside of Portage which
generated this error?
Comment 8 nightelf 2003-10-02 12:43:00 UTC
I tried to compile the source (outside of portage) attached above i.e. inline.c.
No other packages have caused this error.
Comment 9 Joshua Kinard gentoo-dev 2003-10-02 13:03:23 UTC
This apparently doesn't seem to conern Gentoo specifically...You could have
bad ASM that GCC just doesn't like or something, it;s tricky to tell.

All of my machines run gcc-3.3.1 now, so I can't exactly test your case,
however, under gcc-3.3.1, gcc gives the following errors with your provided
inline asm example:

(the source was saved as t.c):
]# gcc t.c -o t
t.c: In function `main':
t.c:8: error: impossible constraint in `asm'

Might I inquire what this source is from? a package not in gentoo yet, or
some personal project of your own?
Comment 10 nightelf 2003-10-02 20:18:41 UTC
 It's some source a lecturer gave me to show some differences between intel
syntax and AT&T syntax.
 My lecturer claimed he could compile it on gcc3.2 (non-gentoo, not sure
of setup) and I can compile it under gcc2.95 (under debian), however,I get
the same error under debian using gcc3.3. Google indicates that this error
has happened before under gcc3.3, and that it's not a bug but something wrong
with the syntax.
 I only sent in the bug-report due to the request in the initial (gcc3.2)
error message and apologise for wasting your (and anyone elses) time.
Comment 11 nightelf 2003-10-02 20:26:06 UTC
 When I say I get the same error under gcc3.3, that's the same as you not
the same as my previous.
Comment 12 Joshua Kinard gentoo-dev 2003-10-02 20:35:29 UTC
I would not be honestly surprised if something got changed in gcc-3.3 that
rendered this code invalid.  The move to gcc-3.3 has caused a number of headaches,
hence what the gcc-porting team is for.  One of the fun little aspects is
the fact that gcc-3.3 no longer accepts multi-line strings, so everytime
a package is discovered with a multi-line string, it has to be patched up
so that gcc-3.3 will compile it.

This subtle change in accepted assembler syntax with gcc is likely another
strange tweak.  I myself know virtually nothing about assembler except that
it can give you gray hairs, so I do not understand the cause as to why this
fails.  I'm sure somewheres on the gcc website (http://gcc.gnu.org/), they
have some kind of a document explaining in detail all of the changes from
3.2 to 3.3, and that may have information regarding the change that causes
your assembler source to fail.  I would look there for further information,
as well as inform your lecturer (assuming a professor or instructor of a
class) of this issue and see if they may know something (this may even be
news to them as well).

All in all, I'll mark this bug as INVALID, since there's really not much
that can be done about it.  It wasn't exactly a bug in gentoo per-say, just
that Gentoo changes the original gcc error message to inform users to report
failures on gentoo systems to Gentoo's bugzilla.  This is likely in an attempt
to prevent a deluge of bugs reports to GCC's own bugzilla team.  Since you've
seen this oddity on debian's gcc-3.3, I'd bet you would also see it on Redhat's
and SuSE's as well.  

And I wouldn't consider this a waste of time either....it's something learned
that may prove of use.