public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dietmar.schindler@manroland-web.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/63326] New: pragma GCC causes wrong code generation
Date: Mon, 22 Sep 2014 06:37:00 -0000	[thread overview]
Message-ID: <bug-63326-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63326

            Bug ID: 63326
           Summary: pragma GCC causes wrong code generation
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dietmar.schindler@manroland-web.com

Created attachment 33530
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33530&action=edit
preprocessed file

The following command generates wrong code, returning 1 instead of 0 (as if the
pragma line ended the statement in which it is placed).

raeksrv1:~/bin/so/c> /tmp/usr/local/bin/gcc -v -save-temps bug.c -o bug         
Using built-in specs.
COLLECT_GCC=/tmp/usr/local/bin/gcc
COLLECT_LTO_WRAPPER=/tmp/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.9.1/configure --enable-plugin --disable-libsanitizer
: (reconfigured) ../gcc-4.9.1/configure --enable-plugin --enable-languages=c
--disable-libsanitizer : (reconfigured) ../gcc-4.9.1/configure --enable-plugin
--enable-languages=c --disable-libsanitizer --disable-libcilkrts
Thread model: posix
gcc version 4.9.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'bug' '-mtune=generic'
'-march=x86-64'
 /tmp/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/cc1 -E -quiet
-v -iprefix /tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/ bug.c
-mtune=generic -march=x86-64 -fpch-preprocess -o bug.i
ignoring nonexistent directory
"/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory
"/tmp/usr/local/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include"
ignoring duplicate directory
"/tmp/usr/local/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include-fixed"
ignoring nonexistent directory
"/tmp/usr/local/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include
 /tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include-fixed
 /usr/local/include
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'bug' '-mtune=generic'
'-march=x86-64'
 /tmp/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/cc1
-fpreprocessed bug.i -quiet -dumpbase bug.c -mtune=generic -march=x86-64
-auxbase bug -version -o bug.s
GNU C (GCC) version 4.9.1 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.1, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.1 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.9.1, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: aa505e323dbffe0cb500ba62f983d917
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'bug' '-mtune=generic'
'-march=x86-64'
 as -v --64 -o bug.o bug.s
GNU assembler version 2.20.1 (i486-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.20.1-system.20100303
COMPILER_PATH=/tmp/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/:/tmp/usr/local/bin/../libexec/gcc/
LIBRARY_PATH=/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/:/tmp/usr/local/bin/../lib/gcc/:/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'bug' '-mtune=generic'
'-march=x86-64'
 /tmp/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o bug
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/crtbegin.o
-L/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1
-L/tmp/usr/local/bin/../lib/gcc
-L/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../.. bug.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed
/tmp/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.1/crtend.o
/usr/lib/../lib64/crtn.o


             reply	other threads:[~2014-09-22  6:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22  6:37 dietmar.schindler@manroland-web.com [this message]
2014-09-22  6:41 ` [Bug c/63326] " pinskia at gcc dot gnu.org
2014-09-24 11:46 ` dietmar.schindler@manroland-web.com
2014-09-24 14:36 ` manu at gcc dot gnu.org
2014-09-24 15:41 ` [Bug c/63326] whether a #pragma is a statement depends on the type of pragma pinskia at gcc dot gnu.org
2014-10-21 23:20 ` pinskia at gcc dot gnu.org
2014-10-22  8:37 ` rguenth at gcc dot gnu.org
2014-10-22  9:12 ` jakub at gcc dot gnu.org
2014-10-22 12:50 ` manu at gcc dot gnu.org
2014-10-22 14:08 ` q.gcc@rsn-tech.co.uk
2014-10-22 14:11 ` manu at gcc dot gnu.org
2020-03-27 18:40 ` pinskia at gcc dot gnu.org
2020-03-27 18:47 ` romain.geissler at amadeus dot com
2020-05-07 11:56 ` jakub at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-07-20 19:40 ` msebor at gcc dot gnu.org
2022-06-28 10:31 ` jakub at gcc dot gnu.org
2023-07-07  7:27 ` rguenth at gcc dot gnu.org
2023-10-10 12:13 ` pinskia at gcc dot gnu.org
2024-01-24 17:27 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-63326-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).