public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly
@ 2013-04-20 21:01 aversa at email dot arizona.edu
  2013-04-21  3:58 ` [Bug bootstrap/57017] " aversa at email dot arizona.edu
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: aversa at email dot arizona.edu @ 2013-04-20 21:01 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

             Bug #: 57017
           Summary: «Error: expecting string instruction after `rep'» in
                    code w/o inline assembly
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: aversa@email.arizona.edu


Compiling code without inline assembly gives an error:

libtool: compile:  gcc -std=gnu99 -DPACKAGE_NAME=\"libblkmaker\"
-DPACKAGE_TARNAME=\"libblkmaker\" -DPACKAGE_VERSION=\"0.1\"
"-DPACKAGE_STRING=\"libblkmaker 0.1\""
-DPACKAGE_BUGREPORT=\"luke_libblkmaker@dashjr.org\"
-DPACKAGE_URL=\"http://gitorious.org/bitcoin/libblkmaker\"
-DPACKAGE=\"libblkmaker\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -O3 -O3 -MT
blkmaker.lo -MD -MP -MF .deps/blkmaker.Tpo -c blkmaker.c  -fPIC -DPIC -o
.libs/blkmaker.o
/tmp/ccot8mMw.s: Assembler messages:
/tmp/ccot8mMw.s:529: Error: expecting string instruction after `rep'

However, disabling inline assembly "-fno-asm" only fixes the problem when "-O3"
is not used. The error always occurs when not specifying "-fno-asm".
>From gcc-bugs-return-420663-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 20 21:44:54 2013
Return-Path: <gcc-bugs-return-420663-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2841 invoked by alias); 20 Apr 2013 21:44:54 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 2813 invoked by uid 48); 20 Apr 2013 21:44:50 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/57017]=?UTF-8?Q? «Error?=: expecting string instruction after `rep'=?UTF-8?Q?» in code w?=/o inline assembly
Date: Sat, 20 Apr 2013 21:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57017-4-nXeHGtNAWU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57017-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57017-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg01808.txt.bz2
Content-length: 188


http://gcc.gnu.org/bugzilla/show_bug.cgi?idW017

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-20 21:44:50 UTC ---
Can you attach the preprocessed source?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug bootstrap/57017] «Error: expecting string instruction after `rep'» in code w/o inline assembly
  2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
@ 2013-04-21  3:58 ` aversa at email dot arizona.edu
  2013-04-21  3:59 ` [Bug target/57017] " pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: aversa at email dot arizona.edu @ 2013-04-21  3:58 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

--- Comment #2 from Alan Aversa <aversa at email dot arizona.edu> 2013-04-21 03:57:56 UTC ---
Created attachment 29907
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29907
the preprocessed C source file


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/57017] «Error: expecting string instruction after `rep'» in code w/o inline assembly
  2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
  2013-04-21  3:58 ` [Bug bootstrap/57017] " aversa at email dot arizona.edu
@ 2013-04-21  3:59 ` pinskia at gcc dot gnu.org
  2013-04-24  5:58 ` aaversa at optics dot arizona.edu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-04-21  3:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-04-21
          Component|bootstrap                   |target
     Ever Confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-21 03:59:55 UTC ---
(In reply to comment #2)
> Created attachment 29907 [details]
> the preprocessed C source file

This cannot be the preprocessed source as it still includes #include in it.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/57017] «Error: expecting string instruction after `rep'» in code w/o inline assembly
  2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
  2013-04-21  3:58 ` [Bug bootstrap/57017] " aversa at email dot arizona.edu
  2013-04-21  3:59 ` [Bug target/57017] " pinskia at gcc dot gnu.org
@ 2013-04-24  5:58 ` aaversa at optics dot arizona.edu
  2013-04-24  6:09 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: aaversa at optics dot arizona.edu @ 2013-04-24  5:58 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

--- Comment #4 from Alan Aversa <aaversa at optics dot arizona.edu> 2013-04-24 05:58:29 UTC ---
Created attachment 29925
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29925
the REAL preprocessed source file

sorry, I uploaded the wrong file; this is the preprocessed source file


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/57017] «Error: expecting string instruction after `rep'» in code w/o inline assembly
  2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
                   ` (2 preceding siblings ...)
  2013-04-24  5:58 ` aaversa at optics dot arizona.edu
@ 2013-04-24  6:09 ` pinskia at gcc dot gnu.org
  2013-04-24  6:15 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-04-24  6:09 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-slackware-linux

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-24 06:09:02 UTC ---
What binutils version are you using?  You can find out by doing "as --version". 

I think this is a bug in the version of binutils you are using the generated
assembly is:
"        rep; ret " which is a valid assembly for x86_64.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/57017] «Error: expecting string instruction after `rep'» in code w/o inline assembly
  2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
                   ` (3 preceding siblings ...)
  2013-04-24  6:09 ` pinskia at gcc dot gnu.org
@ 2013-04-24  6:15 ` jakub at gcc dot gnu.org
  2013-04-24  6:22 ` aaversa at optics dot arizona.edu
  2013-04-25  2:53 ` aaversa at optics dot arizona.edu
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-24  6:15 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-24 06:15:46 UTC ---
Can't reproduce, perhaps misconfigured compiler?
HAVE_AS_IX86_REP_LOCK_PREFIX test in particular.  You haven't said what target
it is and how you've configured the compiler...


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/57017] «Error: expecting string instruction after `rep'» in code w/o inline assembly
  2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
                   ` (4 preceding siblings ...)
  2013-04-24  6:15 ` jakub at gcc dot gnu.org
@ 2013-04-24  6:22 ` aaversa at optics dot arizona.edu
  2013-04-25  2:53 ` aaversa at optics dot arizona.edu
  6 siblings, 0 replies; 8+ messages in thread
From: aaversa at optics dot arizona.edu @ 2013-04-24  6:22 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

Alan Aversa <aaversa at optics dot arizona.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aaversa at optics dot
                   |                            |arizona.edu

--- Comment #7 from Alan Aversa <aaversa at optics dot arizona.edu> 2013-04-24 06:22:54 UTC ---
(In reply to comment #5)
> What binutils version are you using?  You can find out by doing "as --version". 
> 
> I think this is a bug in the version of binutils you are using the generated
> assembly is:
> "        rep; ret " which is a valid assembly for x86_64.

GNU assembler (Linux/GNU Binutils) 2.22.52.0.2.20120424

(In reply to comment #6)
> Can't reproduce, perhaps misconfigured compiler?
> HAVE_AS_IX86_REP_LOCK_PREFIX test in particular.  You haven't said what target
> it is and how you've configured the compiler...

../gcc-4.8.0/configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man
--infodir=/usr/info --enable-shared --enable-bootstrap
--enable-languages=ada,c,c++,fortran,go,java,lto,objc --enable-threads=posix
--enable-checking=release --enable-objc-gc --with-system-zlib
--with-python-dir=/lib64/python2.7/site-packages --disable-libunwind-exceptions
--enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose
--enable-java-home --with-java-home=/usr/lib64/jvm/jre
--with-jvm-root-dir=/usr/lib64/jvm
--with-jvm-jar-dir=/usr/lib64/jvm/jvm-exports --with-arch-directory=amd64
--with-antlr-jar=/home/slackware/slackbuilds/gcc/antlr-runtime-3.4.jar
--enable-multilib --target=x86_64-slackware-linux
--build=x86_64-slackware-linux --host=x86_64-slackware-linux


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/57017] «Error: expecting string instruction after `rep'» in code w/o inline assembly
  2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
                   ` (5 preceding siblings ...)
  2013-04-24  6:22 ` aaversa at optics dot arizona.edu
@ 2013-04-25  2:53 ` aaversa at optics dot arizona.edu
  6 siblings, 0 replies; 8+ messages in thread
From: aaversa at optics dot arizona.edu @ 2013-04-25  2:53 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

--- Comment #8 from Alan Aversa <aaversa at optics dot arizona.edu> 2013-04-25 02:53:02 UTC ---
I upgraded to binutils 2.23.52.0.1 and the problem went away.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-04-25  2:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-20 21:01 [Bug bootstrap/57017] New: «Error: expecting string instruction after `rep'» in code w/o inline assembly aversa at email dot arizona.edu
2013-04-21  3:58 ` [Bug bootstrap/57017] " aversa at email dot arizona.edu
2013-04-21  3:59 ` [Bug target/57017] " pinskia at gcc dot gnu.org
2013-04-24  5:58 ` aaversa at optics dot arizona.edu
2013-04-24  6:09 ` pinskia at gcc dot gnu.org
2013-04-24  6:15 ` jakub at gcc dot gnu.org
2013-04-24  6:22 ` aaversa at optics dot arizona.edu
2013-04-25  2:53 ` aaversa at optics dot arizona.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).