public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/57653] New: filename information discarded when using -imacros
@ 2013-06-19 14:16 allan at archlinux dot org
  2013-06-19 22:30 ` [Bug c/57653] " manu at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: allan at archlinux dot org @ 2013-06-19 14:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57653
           Summary: filename information discarded when using -imacros
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: allan at archlinux dot org

When compiling with the "-imacros" flag, the file name information is lost in
error messages and backtraces.

e.g.

> gcc-4.8 -imacros i.h test.c 
<command-line>: In function ‘main’:
<command-line>:5:1: error: expected ‘;’ before ‘}’ token

The problem commit is:
http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6adc88f8
>From gcc-bugs-return-424645-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 19 15:01:35 2013
Return-Path: <gcc-bugs-return-424645-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5576 invoked by alias); 19 Jun 2013 15:01:35 -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 5534 invoked by uid 48); 19 Jun 2013 15:01:32 -0000
From: "meadori at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/57651] [4.8 / 4.9 Regression] gcc-ar and gcc-nm don't find the lto plugin
Date: Wed, 19 Jun 2013 15:01:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: driver
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: meadori at codesourcery dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57651-4-ynYbcKM7or@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57651-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57651-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01024.txt.bz2
Content-length: 400

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

--- Comment #2 from Meador Inge <meadori at codesourcery dot com> ---
Since Jakub posted a patch for the PATH problem [1] and it seems that the
permission issue might be a non-issue [2] is there anything else let for this
bug?

[1] http://gcc.gnu.org/ml/gcc-patches/2013-06/msg01122.html
[2] http://gcc.gnu.org/ml/gcc-patches/2013-06/msg01113.html


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
@ 2013-06-19 22:30 ` manu at gcc dot gnu.org
  2013-06-20  1:47 ` allan at archlinux dot org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2013-06-19 22:30 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5587 bytes --]

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

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Allan McRae from comment #2)
> # echo "int main() { return }" > foo.c
> # touch foo.h
> # gcc -imacros foo.h foo.c 
> <command-line>: In function ‘main’:
> <command-line>:1:21: error: expected expression before ‘}’ token

I cannot reproduce this with r198545, so it seems fixed in mainline. Could you
test with that?
>From gcc-bugs-return-424673-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 19 22:32:34 2013
Return-Path: <gcc-bugs-return-424673-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7181 invoked by alias); 19 Jun 2013 22:32:34 -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 7131 invoked by uid 48); 19 Jun 2013 22:32:30 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57653] filename information discarded when using -imacros
Date: Wed, 19 Jun 2013 22:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu 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-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57653-4-oNylH4ch3F@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01052.txt.bz2
Content-length: 213

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

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I mean in GCC 4.9.0 (trunk), (that revision is the latest I have built).
>From gcc-bugs-return-424674-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 19 22:58:39 2013
Return-Path: <gcc-bugs-return-424674-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25533 invoked by alias); 19 Jun 2013 22:58:39 -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 25510 invoked by uid 48); 19 Jun 2013 22:58:36 -0000
From: "allan at archlinux dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57653] filename information discarded when using -imacros
Date: Wed, 19 Jun 2013 22:58:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: allan at archlinux dot 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-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57653-4-svhbXqyI1f@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01053.txt.bz2
Content-length: 1358

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

--- Comment #5 from Allan McRae <allan at archlinux dot org> ---
I still get this with r200224

# gcc-4.9 -v
Using built-in specs.
COLLECT_GCC=gcc-4.9
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-git/src/gcc/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share/gcc-4.9
--with-bugurl='http://aur.archlinux.org/packages.php?ID\x16045'
--enable-languages=c,c++,lto --enable-shared --enable-threads=posix
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-clocale=gnu --disable-libstdcxx-pch --enable-gnu-unique-object
--enable-linker-build-id --enable-cloog-backend=isl
--disable-cloog-version-check --enable-lto --enable-gold --enable-ldÞfault
--enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu
--disable-install-libiberty --disable-multilib --disable-libssp
--disable-werror --enable-checking=release --program-suffix=-4.9
--enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.9.0 20130619 (experimental) (GCC)

Built with

CFLAGS="-march=x86-64 -mtune=generic -O2 -fstack-protector
--param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
  2013-06-19 22:30 ` [Bug c/57653] " manu at gcc dot gnu.org
@ 2013-06-20  1:47 ` allan at archlinux dot org
  2013-06-20  7:51 ` manu at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: allan at archlinux dot org @ 2013-06-20  1:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Allan McRae <allan at archlinux dot org> ---
I have also confirmed this issue on Fedora rawhide.

gcc 4.8.1 20130603 (Red Hat 4.8.1-1)


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
  2013-06-19 22:30 ` [Bug c/57653] " manu at gcc dot gnu.org
  2013-06-20  1:47 ` allan at archlinux dot org
@ 2013-06-20  7:51 ` manu at gcc dot gnu.org
  2013-06-23  7:18 ` allan at archlinux dot org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2013-06-20  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Allan McRae from comment #6)
> I have also confirmed this issue on Fedora rawhide.
> 
> gcc 4.8.1 20130603 (Red Hat 4.8.1-1)

What I would do to investigate this issue is to put a breakpoint in linemap_add
and try to figure out what is the difference with and without the -imacro.
There must be some difference there.
>From gcc-bugs-return-424685-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 20 08:38:32 2013
Return-Path: <gcc-bugs-return-424685-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27176 invoked by alias); 20 Jun 2013 08:38:31 -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 27099 invoked by uid 48); 20 Jun 2013 08:38:23 -0000
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/57651] [4.8 / 4.9 Regression] gcc-ar and gcc-nm don't find the lto plugin
Date: Thu, 20 Jun 2013 08:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: driver
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: doko at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: doko at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution target_milestone
Message-ID: <bug-57651-4-JIGwrQJ5wQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57651-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57651-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01064.txt.bz2
Content-length: 510

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.8.2

--- Comment #7 from Matthias Klose <doko at gcc dot gnu.org> ---
the x permission issue is now fixed too.


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (2 preceding siblings ...)
  2013-06-20  7:51 ` manu at gcc dot gnu.org
@ 2013-06-23  7:18 ` allan at archlinux dot org
  2013-06-23 12:04 ` allan at archlinux dot org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: allan at archlinux dot org @ 2013-06-23  7:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Allan McRae <allan at archlinux dot org> ---
I really have no idea what I am looking for...  but adding a breakpoint at
linemap_add I see (reason, file):

LC_ENTER "foo.c"
LC_RENAME "<command-line>"
LC_ENTER "/usr/include/stdc-predef.h"
LC_LEAVE 0x0
LC_RENAME "foo.c"
<- correct output printed here
LC_LEAVE 0x0

LC_ENTER "foo.c"
LC_RENAME "<command-line>"
LC_ENTER "foo.h"
LC_LEAVE 0x0
LC_ENTER "/usr/include/stdc-predef.h"
LC_RENAME "foo.c"
LC_LEAVE 0x0
<- incorrect output printed here
LC_LEAVE 0x0

So it looks like it is not leaving "/usr/include/stdc-predef.h" at the right
time so the wrong thing is being renamed?


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (3 preceding siblings ...)
  2013-06-23  7:18 ` allan at archlinux dot org
@ 2013-06-23 12:04 ` allan at archlinux dot org
  2013-06-23 13:49 ` manu at gcc dot gnu.org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: allan at archlinux dot org @ 2013-06-23 12:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Allan McRae <allan at archlinux dot org> ---
Created attachment 30345
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30345&action=edit
log of gdb session

Here is the log from my gdb session.

Arch builds with no patches, just a could of small sed lines that should not
affect this.  See our build script (plain bash):
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/gcc

Since it is also in Fedora rawhide, hopefully someone there can confirm.


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (4 preceding siblings ...)
  2013-06-23 12:04 ` allan at archlinux dot org
@ 2013-06-23 13:49 ` manu at gcc dot gnu.org
  2013-06-24  8:17 ` manu at gcc dot gnu.org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2013-06-23 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Allan McRae from comment #11)
> Created attachment 30345 [details]
> log of gdb session
> 
> Here is the log from my gdb session.
> 
> Arch builds with no patches, just a could of small sed lines that should not
> affect this.  See our build script (plain bash):
> https://projects.archlinux.org/svntogit/packages.git/tree/trunk/
> PKGBUILD?h=packages/gcc

Does it do a full bootstrap? My gdb session looks more optimized than yours.
Perhaps it is a bug in the host compiler?

My version also does not ever execute this:

Breakpoint 1, linemap_add (set=0x7ffff7ff9000, reason=LC_ENTER, sysp=2,
    to_file=0x140e270 "/usr/include/stdc-predef.h", to_line=1)
    at /build/gcc-git/src/gcc/libcpp/line-map.c:291

In fact, I don't have this file.
manuel@gcc10:~$ cat /etc/debian_version 
6.0.6

so the presence of the file may make a difference (unfortunately, I don't have
root access to gcc10 to fake the file and test).
>From gcc-bugs-return-424905-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jun 23 13:59:02 2013
Return-Path: <gcc-bugs-return-424905-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27769 invoked by alias); 23 Jun 2013 13:59:02 -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 27559 invoked by uid 48); 23 Jun 2013 13:58:54 -0000
From: "allan at archlinux dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57653] filename information discarded when using -imacros
Date: Sun, 23 Jun 2013 13:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: allan at archlinux dot org
X-Bugzilla-Status: WAITING
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57653-4-0ooNTRcWOY@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01284.txt.bz2
Content-length: 466

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

--- Comment #13 from Allan McRae <allan at archlinux dot org> ---
The Arch gcc does the full bootstrap.  The debug build I am using was compiled
with DEBUG_CFLAGS="-g -fvar-tracking-assignments".

The file "/usr/include/stdc-predef.h" is from glibc (v2.17 on Arch) and is
specifically mentioned as being preincluded in
http://gcc.gnu.org/gcc-4.8/porting_to.html.  In fact, using -ffreestanding
"solves" the issue.


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (5 preceding siblings ...)
  2013-06-23 13:49 ` manu at gcc dot gnu.org
@ 2013-06-24  8:17 ` manu at gcc dot gnu.org
  2013-06-25  0:21 ` allan at archlinux dot org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2013-06-24  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Allan McRae from comment #13)
> The file "/usr/include/stdc-predef.h" is from glibc (v2.17 on Arch) and is
> specifically mentioned as being preincluded in
> http://gcc.gnu.org/gcc-4.8/porting_to.html.  In fact, using -ffreestanding
> "solves" the issue.

So when you use -ffreestanding, is stdc-predef.h still included? 

You could put a break in push_command_line_include and check if -include foo.h
still includes stdc-predef.h and whether it shows also the problem. If the file
is included but there is no bug, then my guess is that the code executed before
or after the pre-include stdc-predef.h is missing something for the -imacros
case. If it shows the bug, then the code for pre-including stuff must be wrong
somehow, perhaps cpp_push_default_include is doing something wrong when
compared to cpp_push_include.
>From gcc-bugs-return-424962-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 24 08:18:30 2013
Return-Path: <gcc-bugs-return-424962-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20005 invoked by alias); 24 Jun 2013 08:18:30 -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 19971 invoked by uid 48); 24 Jun 2013 08:18:24 -0000
From: "lts-rudolph at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57695] New: [c++11] generalized attributes with avr __progmem__
Date: Mon, 24 Jun 2013 08:18:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: lts-rudolph at gmx dot de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-57695-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01341.txt.bz2
Content-length: 1607

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

            Bug ID: 57695
           Summary: [c++11] generalized attributes with avr __progmem__
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lts-rudolph at gmx dot de

The two statements:
extern const X x __attribute__ ((__progmem__)) = { 1 };  // works as expected
extern const X x [[__progmem__]] = { 1 };                // warning & broken
code

See the following description to get working example.

The following code compiles as expected with avr-g++ 4.8.1: (code must split in
different translation units to see any result, because the optimizer will
remove all effects while inlining the instructions)

x.h:

struct X
{
    uint8_t a;
};

x.cpp:

extern const X x __attribute__ ((__progmem__)) = { 1 };

main.cpp:

#include "x.h"
extern const X x __attribute__ (( __progmem__ ));

int main()
{
    PORTB = pgm_read_byte(& (x.a));
    return 0;
}

results in (objdump -d):

0000001a <x>:
  1a:   01 00                                               ..
  ...

  2e:   ea e1           ldi r30, 0x1A   ; 26
  30:   f0 e0           ldi r31, 0x00   ; 0
  32:   c8 95           lpm

the result is fine.

Using generalized attributes do NOT work:

extern const X x [[__progmem__]] = { 1 };

this results in a warning "x.cpp:8:32: warning: 'progmem' attribute directive
ignored [-Wattributes]" and the code is broken because the var x is stored to
ram instead of flash.


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (6 preceding siblings ...)
  2013-06-24  8:17 ` manu at gcc dot gnu.org
@ 2013-06-25  0:21 ` allan at archlinux dot org
  2013-06-25  8:30 ` manu at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: allan at archlinux dot org @ 2013-06-25  0:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Allan McRae <allan at archlinux dot org> ---
with -ffreestanding

LC_ENTER "foo.c"
LC_RENAME "<command-line>"
LC_ENTER "foo.h"
LC_LEAVE 0x0
LC_RENAME "foo.c"
<- correct output printed here
LC_LEAVE 0x0

so std-predef.h is not included.


I tried with -include foo.h and a breakpoint in push_command_line_include...  I
just stepped through from that breakpoint and saw cpp_push_default_include
being called for both stdc-predef.h and foo.h.  That also gives the correct
output.

# gcc-4.9 -include foo.h foo.c
foo.c: In function ‘main’:
foo.c:1:21: error: expected expression before ‘}’ token
 int main() { return }
>From gcc-bugs-return-425045-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 25 03:12:56 2013
Return-Path: <gcc-bugs-return-425045-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2358 invoked by alias); 25 Jun 2013 03:12:56 -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 2309 invoked by uid 48); 25 Jun 2013 03:12:53 -0000
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/42607] add information about how to compile a module
Date: Tue, 25 Jun 2013 03:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.4.3
X-Bugzilla-Keywords: documentation
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: kargl at gcc dot gnu.org
X-Bugzilla-Status: WAITING
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-42607-4-RZ07GWoH5r@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-42607-4@http.gcc.gnu.org/bugzilla/>
References: <bug-42607-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01424.txt.bz2
Content-length: 537

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

--- Comment #12 from kargl at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #11)
> What should we do with this PR?

See my comment #1 and #10.  I think that the PR
should be closed with WONTFIX (because gcc does not
have INDIFFERENCE).

Contributing documentation for gfortran is the
easiest way to get involved with its development.
Yet, none of the individuals, who seem to think
that .mod file creation needs to be document,
have step forward to write the doc.


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (7 preceding siblings ...)
  2013-06-25  0:21 ` allan at archlinux dot org
@ 2013-06-25  8:30 ` manu at gcc dot gnu.org
  2013-06-25 17:54 ` manu at gcc dot gnu.org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2013-06-25  8:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Allan McRae from comment #15)
> 
> I tried with -include foo.h and a breakpoint in push_command_line_include...
> I just stepped through from that breakpoint and saw cpp_push_default_include
> being called for both stdc-predef.h and foo.h.  That also gives the correct
> output.
> 
> # gcc-4.9 -include foo.h foo.c
> foo.c: In function ‘main’:
> foo.c:1:21: error: expected expression before ‘}’ token
>  int main() { return }

What is the trace of LC_ messages produced here? It seems the -imacros code is
missing something. Actually, if you could attach the corresponding gdb session
like you did earlier, it would be helpful to compare both.
>From gcc-bugs-return-425055-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 25 08:31:03 2013
Return-Path: <gcc-bugs-return-425055-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9607 invoked by alias); 25 Jun 2013 08:31:03 -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 9573 invoked by uid 48); 25 Jun 2013 08:30:59 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57699] Disable empty parameter list misinterpretation in libstdc++ headers when !defined(NO_IMPLICIT_EXTERN_C)
Date: Tue, 25 Jun 2013 08:31:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: redi 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-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57699-4-6DGoYvAOcA@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57699-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57699-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01434.txt.bz2
Content-length: 603

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Paolo already patched libstdc++ and there's nothing to fix in eCos.

The point is that if I write

extern "C" {
void f();
}

in a libstdc++ header it should mean what the C++ standard says it means.

The implicit extern C kluge is for system headers not known to be C++
compatible, but libstdc++ headers are (of course) C++ compatible, so applying
the kluge is useless and causes bugs when people try to write valid C++, only
to find it has a different meaning on different platforms.


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (8 preceding siblings ...)
  2013-06-25  8:30 ` manu at gcc dot gnu.org
@ 2013-06-25 17:54 ` manu at gcc dot gnu.org
  2013-06-26  8:48 ` manu at gcc dot gnu.org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2013-06-25 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #18 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Thanks!

I think I know the reason why it is failing, but I am not sure about the proper
fix. 

For some reason unknown to me, push_commandline_include should not be called
while processing -imacros. -imacros tries to achieve this but playing tricks
with include_cursor, but that doesn't stop the pre-included files. Calling
cpp_push_include (or cpp_push_default_include) seems to mess up everything
(again, no idea why!). This code is really a mess but the simple patch below
seems to work. Could you test it?


Index: gcc/c-family/c-opts.c
===================================================================
--- gcc/c-family/c-opts.c       (revision 200330)
+++ gcc/c-family/c-opts.c       (working copy)
@@ -1338,10 +1338,14 @@ c_finish_options (void)

 /* Give CPP the next file given by -include, if any.  */
 static void
 push_command_line_include (void)
 {
+  // This can happen if disabled by -imacros for example.
+  if (include_cursor > deferred_count)
+    return;
+
   if (!done_preinclude)
     {
       done_preinclude = true;
       if (flag_hosted && std_inc && !cpp_opts->preprocessed)
        {
>From gcc-bugs-return-425117-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 25 17:59:53 2013
Return-Path: <gcc-bugs-return-425117-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28223 invoked by alias); 25 Jun 2013 17:59:53 -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 28195 invoked by uid 48); 25 Jun 2013 17:59:49 -0000
From: "st at quanttec dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57712] New: GCC fails to to match out-of-line template member function definition with declaration
Date: Tue, 25 Jun 2013 17:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: st at quanttec dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-57712-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01496.txt.bz2
Content-length: 1294

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

            Bug ID: 57712
           Summary: GCC fails to to match out-of-line template member
                    function definition with declaration
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: st at quanttec dot com

g++ 4.8.1 fails to compile the following C++11 code:

struct Test {
  int method(int value) { return value; }

  template <typename T>
  auto test(T value) -> decltype(this->method(value));
};

template <typename T>
auto Test::test(T value) -> decltype(this->method(value)) {
  return this->method(value);
}

int main() {
  Test t;
  return t.test(0);
}

> g++ --std=c++11 test.cpp
test.cpp:9:6: error: prototype for ‘decltype (this->.Test::method(value))
Test::test(T)’ does not match any in class ‘Test’
 auto Test::test(T value) -> decltype(this->method(value)) {
      ^
test.cpp:5:8: error: candidate is: template<class T> decltype
(this->.Test::method(value)) Test::test(T)
   auto test(T value) -> decltype(this->method(value));


If the member function is defined inline, gcc compiles it fine.
>From gcc-bugs-return-425116-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 25 17:59:11 2013
Return-Path: <gcc-bugs-return-425116-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27414 invoked by alias); 25 Jun 2013 17:59:11 -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 27384 invoked by uid 48); 25 Jun 2013 17:59:07 -0000
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/39695] [F03] ProcPtr function results: wrong name in error message
Date: Tue, 25 Jun 2013 17:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.5.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dominiq at lps dot ens.fr
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-39695-4-MxyrDJli9C@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-39695-4@http.gcc.gnu.org/bugzilla/>
References: <bug-39695-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01495.txt.bz2
Content-length: 1013

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
As for 4.8.1 and trunk (r200371), only the second test in comment #0 gives the
'ppr@' name:

  real g   ! "cannot have a type"
        1
Error: Symbol 'ppr@' at (1) cannot have a type

The first test does not give any error and the third one gives (once)

    integer function h(x)   ! "is missing the pointer attribute" (twice!)
    1
Error: Procedure pointer result 'h' at (1) is missing the pointer attribute

The error for the test in comment #1 is

  p => f()  ! << Invalid f() returns a LOGICAL(1) function, but p is a REAL one
       1
Error: Interface mismatch in procedure pointer assignment at (1): Type/rank
mismatch in function result

for 4.8.1 and

  p => f()  ! << Invalid f() returns a LOGICAL(1) function, but p is a REAL one
       1
Error: Interface mismatch in procedure pointer assignment at (1): Type mismatch
in function result (REAL(4)/LOGICAL(1))

for the trunk.


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (9 preceding siblings ...)
  2013-06-25 17:54 ` manu at gcc dot gnu.org
@ 2013-06-26  8:48 ` manu at gcc dot gnu.org
  2014-07-24  9:00 ` mpolacek at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2013-06-26  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org

--- Comment #20 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Allan McRae from comment #19)
> That patch works.  With -imacros foo.h:
> 
> LC_ENTER  foo.c
> LC_RENAME <command-line>
> LC_ENTER  foo.h
> LC_LEAVE  0x0
> LC_ENTER  /usr/include/stdc-predef.h
> LC_LEAVE  0x0
> LC_RENAME foo.c
> <- correct output
> LC_LEAVE  0x0
> 
> All other combinations of -include/-imacros/-ffreestanding/no foo.h  all are
> unchanged as expected.

Great! I am certainly too busy at the moment to go through all the steps of the
contribution process for this. The patch needs to be fully bootstrapped with
the latest trunk, an appropriate testcase needs to be created, plus run the
full regression testsuite and compare the results with the regression results
of the unpatched trunk and check that no new failures appear. Then, it has to
be submitted to gcc-patches with a GNU Changelog.

If you are really interested in fixing this, you should just take the lead.
Feel free to modify the patch as you need. The patch is anyway too small to
require any kind of legal assignment, but if they ask for it, you can always
say I wrote it. I have an assignment in place with the FSF.

When submitting to gcc-patches, CC jsm28@gcc.gnu.org. You can also see in the
svn log or svn blame who wrote the -imacro code and CC him/her as well. (You
can also CC me).
>From gcc-bugs-return-425166-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 26 08:49:39 2013
Return-Path: <gcc-bugs-return-425166-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15787 invoked by alias); 26 Jun 2013 08:49:39 -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 15751 invoked by uid 48); 26 Jun 2013 08:49:36 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57653] filename information discarded when using -imacros
Date: Wed, 26 Jun 2013 08:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57653-4-PkcVYuSRK3@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57653-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01545.txt.bz2
Content-length: 237

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

--- Comment #21 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Once you are in trunk, you can ask the release managers to backport it to the
GCC 4.8 branch.
>From gcc-bugs-return-425167-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 26 09:07:49 2013
Return-Path: <gcc-bugs-return-425167-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26857 invoked by alias); 26 Jun 2013 09:07:48 -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 26829 invoked by uid 48); 26 Jun 2013 09:07:41 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57712] GCC fails to to match out-of-line template member function definition with declaration
Date: Wed, 26 Jun 2013 09:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-57712-4-hrZsYPblWM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57712-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57712-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg01546.txt.bz2
Content-length: 400

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-26
     Ever confirmed|0                           |1


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

* [Bug c/57653] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (10 preceding siblings ...)
  2013-06-26  8:48 ` manu at gcc dot gnu.org
@ 2014-07-24  9:00 ` mpolacek at gcc dot gnu.org
  2015-02-11 10:23 ` [Bug c/57653] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-07-24  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Jul 24 09:00:13 2014
New Revision: 212972

URL: https://gcc.gnu.org/viewcvs?rev=212972&root=gcc&view=rev
Log:
    PR c/57653
    * c-opts.c (c_finish_options): If -imacros is in effect, return.

    * c-c++-common/pr57653.c: New test.
    * c-c++-common/pr57653.h: New file.
    * c-c++-common/pr57653-2.c: New test.
    * c-c++-common/pr57653-2.h: New file.

Added:
    trunk/gcc/testsuite/c-c++-common/pr57653-2.c
    trunk/gcc/testsuite/c-c++-common/pr57653-2.h
    trunk/gcc/testsuite/c-c++-common/pr57653.c
    trunk/gcc/testsuite/c-c++-common/pr57653.h
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-opts.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c/57653] [4.8/4.9 Regression] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (12 preceding siblings ...)
  2015-02-11 10:23 ` [Bug c/57653] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
@ 2015-02-11 10:23 ` rguenth at gcc dot gnu.org
  2015-02-11 12:14 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-11 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.8.5
            Summary|filename information        |[4.8/4.9 Regression]
                   |discarded when using        |filename information
                   |-imacros                    |discarded when using
                   |                            |-imacros

--- Comment #23 from Richard Biener <rguenth at gcc dot gnu.org> ---
If 4.7.3 works this is a regression.  Can we get the patch backported to
release branches please?


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

* [Bug c/57653] [4.8/4.9 Regression] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (11 preceding siblings ...)
  2014-07-24  9:00 ` mpolacek at gcc dot gnu.org
@ 2015-02-11 10:23 ` rguenth at gcc dot gnu.org
  2015-02-11 10:23 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-11 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
Anyway, I'll do that (tested 4.8 already).


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

* [Bug c/57653] [4.8/4.9 Regression] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (13 preceding siblings ...)
  2015-02-11 10:23 ` rguenth at gcc dot gnu.org
@ 2015-02-11 12:14 ` rguenth at gcc dot gnu.org
  2015-02-11 12:15 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-11 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Feb 11 12:14:07 2015
New Revision: 220614

URL: https://gcc.gnu.org/viewcvs?rev=220614&root=gcc&view=rev
Log:
2015-02-11  Richard Biener  <rguenther@suse.de>

    Backport from mainline
    2014-07-24  Marek Polacek  <polacek@redhat.com>

    PR c/57653
    * c-opts.c (c_finish_options): If -imacros is in effect, return.

    * c-c++-common/pr57653.c: New test.
    * c-c++-common/pr57653.h: New file.
    * c-c++-common/pr57653-2.c: New test.
    * c-c++-common/pr57653-2.h: New file.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/pr57653-2.c
    branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/pr57653-2.h
    branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/pr57653.c
    branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/pr57653.h
Modified:
    branches/gcc-4_9-branch/gcc/c-family/ChangeLog
    branches/gcc-4_9-branch/gcc/c-family/c-opts.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


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

* [Bug c/57653] [4.8/4.9 Regression] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (15 preceding siblings ...)
  2015-02-11 12:15 ` rguenth at gcc dot gnu.org
@ 2015-02-11 12:15 ` rguenth at gcc dot gnu.org
  2015-02-12  9:49 ` rguenth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-11 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |4.8.5, 4.9.3
         Resolution|---                         |FIXED
      Known to fail|                            |4.8.4, 4.9.2

--- Comment #27 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

* [Bug c/57653] [4.8/4.9 Regression] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (14 preceding siblings ...)
  2015-02-11 12:14 ` rguenth at gcc dot gnu.org
@ 2015-02-11 12:15 ` rguenth at gcc dot gnu.org
  2015-02-11 12:15 ` rguenth at gcc dot gnu.org
  2015-02-12  9:49 ` rguenth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-11 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Feb 11 12:14:54 2015
New Revision: 220615

URL: https://gcc.gnu.org/viewcvs?rev=220615&root=gcc&view=rev
Log:
2015-02-11  Richard Biener  <rguenther@suse.de>

    Backport from mainline
    2014-07-24  Marek Polacek  <polacek@redhat.com>

    PR c/57653
    * c-opts.c (c_finish_options): If -imacros is in effect, return.

    * c-c++-common/pr57653.c: New test.
    * c-c++-common/pr57653.h: New file.
    * c-c++-common/pr57653-2.c: New test.
    * c-c++-common/pr57653-2.h: New file.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/c-c++-common/pr57653-2.c
    branches/gcc-4_8-branch/gcc/testsuite/c-c++-common/pr57653-2.h
    branches/gcc-4_8-branch/gcc/testsuite/c-c++-common/pr57653.c
    branches/gcc-4_8-branch/gcc/testsuite/c-c++-common/pr57653.h
Modified:
    branches/gcc-4_8-branch/gcc/c-family/c-opts.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug c/57653] [4.8/4.9 Regression] filename information discarded when using -imacros
  2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
                   ` (16 preceding siblings ...)
  2015-02-11 12:15 ` rguenth at gcc dot gnu.org
@ 2015-02-12  9:49 ` rguenth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-12  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Feb 12 09:48:56 2015
New Revision: 220642

URL: https://gcc.gnu.org/viewcvs?rev=220642&root=gcc&view=rev
Log:
2015-02-11  Richard Biener  <rguenther@suse.de>

    Backport from mainline
    2014-07-24  Marek Polacek  <polacek@redhat.com>

    PR c/57653
    * c-opts.c (c_finish_options): If -imacros is in effect, return.

Modified:
    branches/gcc-4_8-branch/gcc/c-family/ChangeLog


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

end of thread, other threads:[~2015-02-12  9:49 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19 14:16 [Bug middle-end/57653] New: filename information discarded when using -imacros allan at archlinux dot org
2013-06-19 22:30 ` [Bug c/57653] " manu at gcc dot gnu.org
2013-06-20  1:47 ` allan at archlinux dot org
2013-06-20  7:51 ` manu at gcc dot gnu.org
2013-06-23  7:18 ` allan at archlinux dot org
2013-06-23 12:04 ` allan at archlinux dot org
2013-06-23 13:49 ` manu at gcc dot gnu.org
2013-06-24  8:17 ` manu at gcc dot gnu.org
2013-06-25  0:21 ` allan at archlinux dot org
2013-06-25  8:30 ` manu at gcc dot gnu.org
2013-06-25 17:54 ` manu at gcc dot gnu.org
2013-06-26  8:48 ` manu at gcc dot gnu.org
2014-07-24  9:00 ` mpolacek at gcc dot gnu.org
2015-02-11 10:23 ` [Bug c/57653] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2015-02-11 10:23 ` rguenth at gcc dot gnu.org
2015-02-11 12:14 ` rguenth at gcc dot gnu.org
2015-02-11 12:15 ` rguenth at gcc dot gnu.org
2015-02-11 12:15 ` rguenth at gcc dot gnu.org
2015-02-12  9:49 ` rguenth at gcc dot gnu.org

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).