public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/87697] Casting a base class to derived gives no warning
[not found] <bug-87697-4@http.gcc.gnu.org/bugzilla/>
@ 2018-10-23 15:18 ` jynelson at email dot sc.edu
2022-12-23 14:54 ` arthur.j.odwyer at gmail dot com
1 sibling, 0 replies; 2+ messages in thread
From: jynelson at email dot sc.edu @ 2018-10-23 15:18 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: 113206 bytes --]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87697
--- Comment #2 from jynelson at email dot sc.edu ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to jynelson from comment #0)
> > Casting a base class to a derived class gives no warning, even with -Wall
> > -Werror enabled. I've been told on IRC that this sort of cast is undefined
> > behaviour according to spec if neither class is virtual.
>
> It has nothing to do with whether anything is virtual or not. The relevant
> standard wording is:
>
> If the object of type âcv1 Bâ is actually a base class subobject of an
> object of type D, the result refers to the enclosing object of type D.
> Otherwise, the behavior is undefined.
Found this at http://www.open-std.org/jtc1/sc22/open/n2356/expr.html, good to
know it's undefined for sure.
>
> > If that is the
> > case, it would be nice to have a warning.
>
> It's only possible to warn when the compiler can statically prove that the
> pointer really isn't pointing to a derived. That's possible in your example
> because it was created right there by the 'new c1' expression, but that is a
> very silly thing to do and surely nobody does it in real code. Generally a
> function just gets passed a pointer to a base class, and can't see its
> construction, so can't tell if the cast is valid or not.
I would argue the compiler is in the best place to statically prove an invalid
downcast,
since it knows the types of every object. I'm not sure how functions relate to
this,
but if it's easier to go by a function's type signature, I think it would be
better
to warn on *any* downcast, and make the developer specifically override that
warning.
Part of the reason I opened the bug is I didn't know this was illegal at first.
>
> > If that isn't the case, there are several more questions that arise, like
> > `why does c1 have access to c2` and `why can the const value c2::x be
> > accessed without be initialized`?
>
> It doesn't, because there's no c2 object constructed. Obviously the code is
> silly and broken.
Of course it's silly and broken, it's an example.
In a larger project, where there's an intermediary object defined many lines
away
from this assignment, it would be much easier for this to slip by even with
code review
on the assumption that the original was the correct class.
something like this:
```
c1 original;
// ... a bunch of code ...
// looks reasonable
derived *obj = static_cast<derived*>( &original );
```
This is exacerbated by static cast never giving a warning.
This is OK for integers and floats where downcasts are well-defined,
but for undefined behaviour there should at least be a warning.
I would actually argue it should be an error, the same way
casting completely different types is an error
(https://stackoverflow.com/questions/14380275).
I'll attach some code that compiles (except for the error) as an example.
>
> I don't think a compiler warning would be worthwhile, because it would only
> warn about code which is obviously wrong by inspection i.e. which should be
> caught by the most cursory code review.
I disagree that that it would have to be cursory.
> The general case can be diagnosed through runtime instrumentation but
> -fsanitize=undefined only gives a runtime error for an invalid static_cast
> involving polymorphic types (because the type identification is linked to
> the vtable).
>
> -fsanitize=address does diagnose that accessing members of c2 performs an
> out-of-bounds read:
>
This is useful, but a little obscure, I doubt it's widely used.
>From gcc-bugs-return-618554-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:22:00 2018
Return-Path: <gcc-bugs-return-618554-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 126553 invoked by alias); 23 Oct 2018 15:22:00 -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 126512 invoked by uid 48); 23 Oct 2018 15:21:56 -0000
From: "jynelson at email dot sc.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87697] Casting a base class to derived gives no warning
Date: Tue, 23 Oct 2018 15:22: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: 7.3.1
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jynelson at email dot sc.edu
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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: attachments.created
Message-ID: <bug-87697-4-Ljw8V6MUft@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87697-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87697-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: 2018-10/txt/msg01936.txt.bz2
Content-length: 246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87697
--- Comment #3 from jynelson at email dot sc.edu ---
Created attachment 44884
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44884&action=edit
Casting unrelated types gives an error
>From gcc-bugs-return-618555-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:29:39 2018
Return-Path: <gcc-bugs-return-618555-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 47973 invoked by alias); 23 Oct 2018 15:29: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 47936 invoked by uid 55); 23 Oct 2018 15:29:35 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/87704] [6/7/8/9 Regression] unique_ptr<T>(nullptr_t) requires T to be complete
Date: Tue, 23 Oct 2018 15:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: redi at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-87704-4-u1n2Ls2ent@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87704-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87704-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: 2018-10/txt/msg01937.txt.bz2
Content-length: 1155
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87704
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Oct 23 15:29:03 2018
New Revision: 265428
URL: https://gcc.gnu.org/viewcvs?rev=265428&root=gcc&view=rev
Log:
PR libstdc++/87704 fix unique_ptr(nullptr_t) constructors
Using a delegating constructor to implement these constructors means
that they instantiate the destructor, which requires the element_type to
be complete. In C++11 and C++14 they were specified to be delegating,
but that was changed as part of LWG 2801 so in C++17 they don't require
a complete type (as was intended all along).
PR libstdc++/87704
* include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
not delegate to default constructor.
(unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
* testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.
Added:
branches/gcc-8-branch/libstdc++-v3/testsuite/20_util/unique_ptr/cons/incomplete.cc
Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/unique_ptr.h
>From gcc-bugs-return-618556-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:31:37 2018
Return-Path: <gcc-bugs-return-618556-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 51708 invoked by alias); 23 Oct 2018 15:31:24 -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 51022 invoked by uid 48); 23 Oct 2018 15:30:41 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/87527] uniform_real_distribution can't generate the full range of finite floating point numbers
Date: Tue, 23 Oct 2018 15:31:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 7.3.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
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-87527-4-r3A1TxuhTM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87527-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87527-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: 2018-10/txt/msg01938.txt.bz2
Content-length: 261
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87527
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
$ g++ -D_GLIBCXX_ASSERTIONS uniform_real.cc
$ ./a.out
a.out: uniform_real.cc:13: int main(): Assertion `x >= low && x < high' failed.
>From gcc-bugs-return-618557-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:32:35 2018
Return-Path: <gcc-bugs-return-618557-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 54839 invoked by alias); 23 Oct 2018 15: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 54747 invoked by uid 48); 23 Oct 2018 15:32:30 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/87527] uniform_real_distribution can't generate the full range of finite floating point numbers
Date: Tue, 23 Oct 2018 15:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 7.3.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
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-87527-4-mSQBRetE8r@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87527-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87527-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: 2018-10/txt/msg01939.txt.bz2
Content-length: 229
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87527
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh sorry, you provided that message yourself. That assertion is there to
enforce the precondition you found.
>From gcc-bugs-return-618558-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:36:53 2018
Return-Path: <gcc-bugs-return-618558-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 62067 invoked by alias); 23 Oct 2018 15:36:52 -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 61909 invoked by uid 48); 23 Oct 2018 15:36:48 -0000
From: "dilyan.palauzov at aegee dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/87710] New: Explicitly mentioned libraries by -lx are not in the DT_NEEDED list
Date: Tue, 23 Oct 2018 15:36: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: 7.3.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dilyan.palauzov at aegee dot org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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 target_milestone
Message-ID: <bug-87710-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: 2018-10/txt/msg01940.txt.bz2
Content-length: 7080
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87710
Bug ID: 87710
Summary: Explicitly mentioned libraries by -lx are not in the
DT_NEEDED list
Product: gcc
Version: 7.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dilyan.palauzov at aegee dot org
Target Milestone: ---
Calling âmake installâ without DESTDIR after building libc-2.28 calls
eventually glibc-2.28/srcribts/test-installation.pl . It creates the file
test-prg7044.c with content:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
printf ("Your new glibc installation seems to be ok.\n");
exit (0);
}
Then calls âgcc /src/glibc228/test-prg7044.c -lc -lBrokenLocale -lpthread
-lcrypt -ldl -lgcc_s -lnsl -lutil -lnss_dns -lnss_compat -lmvec -lresolv
-lnss_db -lm -lnss_files -lrt -lnss_hesiod -lanl -o
/src/glibc228/test-prg7044â, and chechs whether âldd test-prg7044â contains
BrokenLocale. On my system the comman above invoked with -v prints:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --enable-threads=posix --enable-nls
--disable-multilib --enable-interpreter --with-system-zlib
--enable-libgcj-multifile --enable-languages=all --enable-targets=all
--with-system-unwind --without-x --with-linker-hash-style=gnu --enable-shared
--with-build-config='bootstrap-lto bootstrap-O3'
Thread model: posix
gcc version 7.3.1 20181013 (GCC)
COLLECT_GCC_OPTIONS='-v' '-o' '/src/glibc228//test-prg7044' '-mtune=generic'
'-march=x86-64'
/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/cc1 -quiet -v -imultiarch
x86_64-linux-gnu /src/glibc228//test-prg7044.c -quiet -dumpbase test-prg7044.c
-mtune=generic -march=x86-64 -auxbase test-prg7044 -version -o /tmp/ccDutEqy.s
GNU C11 (GCC) version 7.3.1 20181013 (x86_64-pc-linux-gnu)
compiled by GNU C version 7.3.1 20181013, GMP version 6.1.2, MPFR
version 4.0.0, MPC version 1.1.0, isl version isl-0.19-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include
/usr/local/include
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
GNU C11 (GCC) version 7.3.1 20181013 (x86_64-pc-linux-gnu)
compiled by GNU C version 7.3.1 20181013, GMP version 6.1.2, MPFR
version 4.0.0, MPC version 1.1.0, isl version isl-0.19-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8ff192ae53ef780b032a40b890e7c233
COLLECT_GCC_OPTIONS='-v' '-o' '/src/glibc228//test-prg7044' '-mtune=generic'
'-march=x86-64'
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/bin/as
-v --64 -o /tmp/ccZTddK3.o /tmp/ccDutEqy.s
GNU assembler version 2.31.51 (x86_64-pc-linux-gnu) using BFD version (GNU
Binutils) 2.31.51.20181019
COMPILER_PATH=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/:/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/:/usr/local/libexec/gcc/x86_64-pc-linux-gnu/:/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/:/usr/local/lib/gcc/x86_64-pc-linux-gnu/:/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/bin/
LIBRARY_PATH=/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/:/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../x86_64-linux-gnu/:/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../lib64/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib64/:/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/lib/:/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' '/src/glibc228//test-prg7044' '-mtune=generic'
'-march=x86-64'
/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/collect2 -plugin
/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/liblto_plugin.so
-plugin-opt=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccLuMS4y.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2 -o /src/glibc228//test-prg7044
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/crtbegin.o
-L/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1
-L/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../x86_64-linux-gnu
-L/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../lib64
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/../lib64
-L/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/lib
-L/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../.. /tmp/ccZTddK3.o
--no-as-needed -lc -lBrokenLocale -lpthread -lcrypt -ldl -lgcc_s -lnsl -lutil
-lnss_dns -lnss_compat -lmvec -lresolv -lnss_db -lm -lnss_files -lrt
-lnss_hesiod -lanl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc
--as-needed -lgcc_s --no-as-needed
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/crtend.o /usr/lib/../lib64/crtn.o
COLLECT_GCC_OPTIONS='-v' '-o' '/src/glibc228//test-prg7044' '-mtune=generic'
'-march=x86-64'
and ldd test-prg prints:
linux-vdso.so.1 (0x00007ffcb77ba000)
libc.so.6 => /lib64/libc.so.6 (0x00007f14efb4c000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f14efb2b000)
libgcc_s.so.1 => /usr/local/lib64/libgcc_s.so.1 (0x00007f14efb12000)
libnss_dns.so.2 => /lib64/libnss_dns.so.2 (0x00007f14efb0b000)
libnss_compat.so.2 => /lib64/libnss_compat.so.2 (0x00007f14efb00000)
libmvec.so.1 => /lib64/libmvec.so.1 (0x00007f14efad4000)
libnss_db.so.2 => /lib64/libnss_db.so.2 (0x00007f14efac5000)
libnss_files.so.2 => /lib64/libnss_files.so.2 (0x00007f14efab0000)
libnss_hesiod.so.2 => /lib64/libnss_hesiod.so.2 (0x00007f14efaaa000)
/lib64/ld-linux-x86-64.so.2 (0x00007f14efd20000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f14efa91000)
libm.so.6 => /lib64/libm.so.6 (0x00007f14ef912000)
Since libBrokenLocale and others are not listed by ldd, test-installation.pl
fails.
Neither -fuse-ld=gold nor -Wl,--no-as-needed do have any impact.
See also https://sourceware.org/bugzilla/show_bug.cgi?id=23807
I have binutils 2.31.51.20181019 and gcc 7.3.1 20181013.
>From gcc-bugs-return-618559-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:41:38 2018
Return-Path: <gcc-bugs-return-618559-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 79293 invoked by alias); 23 Oct 2018 15:41:38 -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 78503 invoked by uid 48); 23 Oct 2018 15:41:31 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87709] c++17 class template argument deduction not working in a very specific case
Date: Tue, 23 Oct 2018 15:41: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: 8.2.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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: keywords bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-87709-4-CEhv3qJSPh@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87709-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87709-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: 2018-10/txt/msg01941.txt.bz2
Content-length: 854
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87709
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-10-23
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed, reduced:
template <class T>
struct lit {
lit(T) { }
};
template <class T>
int operator+(lit<T>, lit<T>) {
return 0;
}
auto r2 = (lit(0)) + lit(0);
11 | auto r2 = (lit(0)) + lit(0);
| ^~~
ctad.cc:2:8: note: 'template<class T> struct lit' declared here
2 | struct lit {
| ^~~
>From gcc-bugs-return-618560-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:46:41 2018
Return-Path: <gcc-bugs-return-618560-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 98923 invoked by alias); 23 Oct 2018 15:46:41 -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 98779 invoked by uid 48); 23 Oct 2018 15:46:35 -0000
From: "romain.geissler at amadeus dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/87698] [lto] Shared library build with -ffat-lto-objects generates extra global absolute symbol relocations
Date: Tue, 23 Oct 2018 15:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 8.2.1
X-Bugzilla-Keywords: lto
X-Bugzilla-Severity: normal
X-Bugzilla-Who: romain.geissler at amadeus dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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-87698-4-pNVEyNxFCT@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87698-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87698-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: 2018-10/txt/msg01942.txt.bz2
Content-length: 1657
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87698
--- Comment #5 from Romain Geissler <romain.geissler at amadeus dot com> ---
Reduced test case:
> cat test.c
void f() {}
> cat test2.c
void f();
void g()
{
f();
}
> cat test.ver
{
local: *;
};
> gcc -g -flto -ffat-lto-objects -fPIC -o test.fat-objects.o -c test.c
> gcc -g -flto -ffat-lto-objects -fPIC -o test2.fat-objects.o -c test2.c
> gcc -g -flto -ffat-lto-objects -fPIC -shared -o test.fat-objects.so test.fat-objects.o test2.fat-objects.o -Wl,-version-script=test.ver
> gcc -g -flto -fno-fat-lto-objects -fPIC -o test.slim-objects.o -c test.c
> gcc -g -flto -fno-fat-lto-objects -fPIC -o test2.slim-objects.o -c test2.c
> gcc -g -flto -fno-fat-lto-objects -fPIC -shared -o test.slim-objects.so test.slim-objects.o test2.slim-objects.o -Wl,-version-script=test.ver
> readelf -a test.fat-objects.so|grep ABS
5: 0000000000000000 0 NOTYPE GLOBAL DEFAULT ABS f <--- unexpected
symbol here
29: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
37: 0000000000000000 0 FILE LOCAL DEFAULT ABS
40: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
42: 0000000000000000 0 FILE LOCAL DEFAULT ABS
77: 0000000000000000 0 FILE LOCAL DEFAULT ABS
> readelf -a test.slim-objects.so|grep ABS
29: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
37: 0000000000000000 0 FILE LOCAL DEFAULT ABS
40: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
42: 0000000000000000 0 FILE LOCAL DEFAULT ABS
65: 0000000000000000 0 FILE LOCAL DEFAULT ABS
>From gcc-bugs-return-618561-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:49:19 2018
Return-Path: <gcc-bugs-return-618561-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 106969 invoked by alias); 23 Oct 2018 15:49:19 -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 106840 invoked by uid 48); 23 Oct 2018 15:49:12 -0000
From: "romain.geissler at amadeus dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/87698] [lto] Shared library build with -ffat-lto-objects generates extra global absolute symbol relocations
Date: Tue, 23 Oct 2018 15:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 8.2.1
X-Bugzilla-Keywords: lto
X-Bugzilla-Severity: normal
X-Bugzilla-Who: romain.geissler at amadeus dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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-87698-4-4udM4bTtBY@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87698-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87698-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: 2018-10/txt/msg01943.txt.bz2
Content-length: 697
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87698
--- Comment #6 from Romain Geissler <romain.geissler at amadeus dot com> ---
Versions of gcc and ld:
> gcc --version
gcc (GCC) 8.2.1 20181011
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ld --version
GNU ld (GNU Binutils) 2.31.1.20181011
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
>From gcc-bugs-return-618562-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:51:03 2018
Return-Path: <gcc-bugs-return-618562-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 109127 invoked by alias); 23 Oct 2018 15:51: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 109033 invoked by uid 48); 23 Oct 2018 15:50:58 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/86439] CTAD with deleted copy constructor fails due to deduction-guide taking by value
Date: Tue, 23 Oct 2018 15:51: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: 8.1.1
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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-86439-4-nksHdYdinU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-86439-4@http.gcc.gnu.org/bugzilla/>
References: <bug-86439-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: 2018-10/txt/msg01944.txt.bz2
Content-length: 402
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86439
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-10-23
Ever confirmed|0 |1
>From gcc-bugs-return-618563-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:53:56 2018
Return-Path: <gcc-bugs-return-618563-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 111936 invoked by alias); 23 Oct 2018 15:53: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 111874 invoked by uid 48); 23 Oct 2018 15:53:52 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87709] c++17 class template argument deduction not working in a very specific case
Date: Tue, 23 Oct 2018 15:53: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: 8.2.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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-87709-4-Xd28ileWFr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87709-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87709-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: 2018-10/txt/msg01945.txt.bz2
Content-length: 409
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87709
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oops, I missed the first line of the diagnostic. The error from trunk is:
ctad.cc:11:12: error: missing template arguments after 'lit'
11 | auto r2 = (lit(0)) + lit(0);
| ^~~
ctad.cc:2:8: note: 'template<class T> struct lit' declared here
2 | struct lit {
| ^~~
>From gcc-bugs-return-618564-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 15:55:42 2018
Return-Path: <gcc-bugs-return-618564-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 114194 invoked by alias); 23 Oct 2018 15:55:42 -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 114138 invoked by uid 55); 23 Oct 2018 15:55:37 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/87704] [6/7/8/9 Regression] unique_ptr<T>(nullptr_t) requires T to be complete
Date: Tue, 23 Oct 2018 15:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: redi at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-87704-4-6Wihn6Y2Qb@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87704-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87704-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: 2018-10/txt/msg01946.txt.bz2
Content-length: 1155
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87704
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Oct 23 15:55:05 2018
New Revision: 265429
URL: https://gcc.gnu.org/viewcvs?rev=265429&root=gcc&view=rev
Log:
PR libstdc++/87704 fix unique_ptr(nullptr_t) constructors
Using a delegating constructor to implement these constructors means
that they instantiate the destructor, which requires the element_type to
be complete. In C++11 and C++14 they were specified to be delegating,
but that was changed as part of LWG 2801 so in C++17 they don't require
a complete type (as was intended all along).
PR libstdc++/87704
* include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
not delegate to default constructor.
(unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
* testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.
Added:
branches/gcc-7-branch/libstdc++-v3/testsuite/20_util/unique_ptr/cons/incomplete.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/bits/unique_ptr.h
>From gcc-bugs-return-618565-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:03:00 2018
Return-Path: <gcc-bugs-return-618565-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 119473 invoked by alias); 23 Oct 2018 16:02:59 -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 119436 invoked by uid 48); 23 Oct 2018 16:02:55 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/87710] Explicitly mentioned libraries by -lx are not in the DT_NEEDED list
Date: Tue, 23 Oct 2018 16:02: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: 7.3.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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-87710-4-Jwc0ZANvph@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87710-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87710-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: 2018-10/txt/msg01947.txt.bz2
Content-length: 161
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87710
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The linker is part of binutils. not gcc.
>From gcc-bugs-return-618566-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:10:48 2018
Return-Path: <gcc-bugs-return-618566-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10203 invoked by alias); 23 Oct 2018 16:10:45 -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 9961 invoked by uid 48); 23 Oct 2018 16:10:31 -0000
From: "dilyan.palauzov at aegee dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/87710] Explicitly mentioned libraries by -lx are not in the DT_NEEDED list
Date: Tue, 23 Oct 2018 16:10: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: 7.3.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dilyan.palauzov at aegee dot org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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-87710-4-kOdHN9WGB8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87710-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87710-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: 2018-10/txt/msg01948.txt.bz2
Content-length: 332
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87710
--- Comment #2 from ÐилÑн ÐалаÑзов <dilyan.palauzov at aegee dot org> ---
I tried this with -fuse-ld=gold and -fuse-ld=bfd .
If you mean the problem is in both ld.bfd and ld.gold, I will report it there.
>From gcc-bugs-return-618567-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:12:47 2018
Return-Path: <gcc-bugs-return-618567-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 46361 invoked by alias); 23 Oct 2018 16:12:46 -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 46313 invoked by uid 48); 23 Oct 2018 16:12:41 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/87710] Explicitly mentioned libraries by -lx are not in the DT_NEEDED list
Date: Tue, 23 Oct 2018 16:12: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: 7.3.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: MOVED
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 resolution
Message-ID: <bug-87710-4-o0LNVIpPw7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87710-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87710-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: 2018-10/txt/msg01949.txt.bz2
Content-length: 532
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87710
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |MOVED
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
GCC has nothing to do with adding DT_NEEDED tags, the linker is responsible for
it (whether ld.bfd or ld.gold).
>From gcc-bugs-return-618568-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:37:17 2018
Return-Path: <gcc-bugs-return-618568-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 112364 invoked by alias); 23 Oct 2018 16:37:16 -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 112262 invoked by uid 48); 23 Oct 2018 16:37:11 -0000
From: "dilyan.palauzov at aegee dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/87710] Explicitly mentioned libraries by -lx are not in the DT_NEEDED list
Date: Tue, 23 Oct 2018 16:37: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: 7.3.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dilyan.palauzov at aegee dot org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: MOVED
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-87710-4-KoSgaw9Ml5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87710-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87710-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: 2018-10/txt/msg01950.txt.bz2
Content-length: 345
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87710
--- Comment #4 from ÐилÑн ÐалаÑзов <dilyan.palauzov at aegee dot org> ---
Moved to
for ld.bfd: https://sourceware.org/bugzilla/show_bug.cgi?id=23811
for ld.gold: https://sourceware.org/bugzilla/show_bug.cgi?id=23812
>From gcc-bugs-return-618569-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:51:41 2018
Return-Path: <gcc-bugs-return-618569-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27532 invoked by alias); 23 Oct 2018 16:51:41 -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 27414 invoked by uid 48); 23 Oct 2018 16:51:37 -0000
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/40678] Using a function as variable: ICE with 4.3, accepts invalid with 4.4/4.5
Date: Tue, 23 Oct 2018 16:51: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.3.3
X-Bugzilla-Keywords: accepts-invalid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gscfq@t-online.de
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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: cc
Message-ID: <bug-40678-4-Ccjc5PagxI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-40678-4@http.gcc.gnu.org/bugzilla/>
References: <bug-40678-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: 2018-10/txt/msg01951.txt.bz2
Content-length: 633
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40678
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gscfq@t-online.de
--- Comment #4 from G. Steinmetz <gscfq@t-online.de> ---
No ICE with versions configured with --enable-checking=yes or =release.
$ cat z1.f90
module m
implicit none
contains
subroutine s
logical :: f
f = g !()
end
logical function g()
g = .true.
end
end
$ gfortran-9-20181021-chk -c z1.f90
>From gcc-bugs-return-618570-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:53:01 2018
Return-Path: <gcc-bugs-return-618570-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32783 invoked by alias); 23 Oct 2018 16:53:01 -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 32711 invoked by uid 48); 23 Oct 2018 16:52:57 -0000
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/40678] Using a function as variable: ICE with 4.3, accepts invalid with 4.4/4.5
Date: Tue, 23 Oct 2018 16:53: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.3.3
X-Bugzilla-Keywords: accepts-invalid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gscfq@t-online.de
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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-40678-4-RXXoG2OTJl@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-40678-4@http.gcc.gnu.org/bugzilla/>
References: <bug-40678-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: 2018-10/txt/msg01952.txt.bz2
Content-length: 744
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40678
--- Comment #5 from G. Steinmetz <gscfq@t-online.de> ---
Following program compiles smoothly and runs ...
Invocations of function h need obligatoric parenthesis, and a dummy.
On the other hand, "implicit none" would force variable h to be
explicitly declared.
$ cat z2.f90
module m
implicit none
contains
logical function f()
f = h
end function
logical function g()
g = .not. h
end function
logical function h(x)
logical, intent(in) :: x
h = .not. x
end function
end
program p
use m
print *, f()
print *, g() ! .not. f()
end
$ gfortran-9-20181021-chk -Wall -Wextra -fcheck=all -static-libgfortran -g
z2.f90
$ a.out
F
F
>From gcc-bugs-return-618571-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:55:28 2018
Return-Path: <gcc-bugs-return-618571-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 35460 invoked by alias); 23 Oct 2018 16:55:28 -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 35394 invoked by uid 48); 23 Oct 2018 16:55:23 -0000
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/49278] ICE (segfault) when combining DATA with default initialization
Date: Tue, 23 Oct 2018 16:55: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.6.1
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gscfq@t-online.de
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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-49278-4-PWKHO2m6mD@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-49278-4@http.gcc.gnu.org/bugzilla/>
References: <bug-49278-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: 2018-10/txt/msg01953.txt.bz2
Content-length: 1445
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49278
--- Comment #18 from G. Steinmetz <gscfq@t-online.de> ---
Update and simplified a bit, ICEs down to at least version 5 :
$ cat z1.f90
module m
type t
sequence
real :: a
real :: b = 2.0
end type
type(t) :: z
data z%a /3.0/
end
$ cat z2.f90
program p
type t
real :: a
real :: b = 2.0
end type
type(t) :: z
data z%a /3.0/
end
$ gfortran-9-20181021 -c z2.f90
z2.f90:1:0:
1 | program p
|
internal compiler error: Segmentation fault
0xb1c86f crash_signal
../../gcc/toplev.c:325
0x6ec0cd gfc_conv_structure(gfc_se*, gfc_expr*, int)
../../gcc/fortran/trans-expr.c:7865
0x6fca91 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool,
bool)
../../gcc/fortran/trans-expr.c:7027
0x6e1647 gfc_get_symbol_decl(gfc_symbol*)
../../gcc/fortran/trans-decl.c:1824
0x6e3ec7 generate_local_decl
../../gcc/fortran/trans-decl.c:5596
0x6a80f2 do_traverse_symtree
../../gcc/fortran/symbol.c:4151
0x6e4fe4 generate_local_vars
../../gcc/fortran/trans-decl.c:5796
0x6e4fe4 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6440
0x673426 translate_all_program_units
../../gcc/fortran/parse.c:6125
0x673426 gfc_parse_file()
../../gcc/fortran/parse.c:6328
0x6ba3ff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204
>From gcc-bugs-return-618572-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:57:26 2018
Return-Path: <gcc-bugs-return-618572-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 38949 invoked by alias); 23 Oct 2018 16:57:26 -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 38867 invoked by uid 48); 23 Oct 2018 16:57:21 -0000
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/49278] ICE (segfault) when combining DATA with default initialization
Date: Tue, 23 Oct 2018 16:57: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.6.1
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gscfq@t-online.de
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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-49278-4-oWhGhRoWwy@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-49278-4@http.gcc.gnu.org/bugzilla/>
References: <bug-49278-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: 2018-10/txt/msg01954.txt.bz2
Content-length: 1189
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49278
--- Comment #19 from G. Steinmetz <gscfq@t-online.de> ---
Adding a "parameter" attribute :
$ cat z8.f90
program p
type t
real :: a
real :: b = 2.0
end type
type(t), parameter :: z = t(4.0, 5.0)
data z%a /3.0/
end
$ cat z9.f90
program p
type t
real :: a
end type
type(t), parameter :: z = t(4.0)
data z%a /3.0/
end
$ gfortran-9-20181021 -c z9.f90
z9.f90:7:0:
7 | end
|
internal compiler error: Segmentation fault
0xb1c86f crash_signal
../../gcc/toplev.c:325
0x6d9481 check_constant_initializer
../../gcc/fortran/trans-decl.c:5198
0x6d9ef4 gfc_emit_parameter_debug_info
../../gcc/fortran/trans-decl.c:5262
0x6a80f2 do_traverse_symtree
../../gcc/fortran/symbol.c:4151
0x6e53fa gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6671
0x673426 translate_all_program_units
../../gcc/fortran/parse.c:6125
0x673426 gfc_parse_file()
../../gcc/fortran/parse.c:6328
0x6ba3ff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204
Adding "pointer" instead of "parameter" gives pr50410 comment 0.
>From gcc-bugs-return-618573-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 16:58:43 2018
Return-Path: <gcc-bugs-return-618573-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 41788 invoked by alias); 23 Oct 2018 16:58:43 -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 41728 invoked by uid 48); 23 Oct 2018 16:58:39 -0000
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/87711] New: ICE in gfc_trans_transfer, at fortran/trans-io.c:2676
Date: Tue, 23 Oct 2018 16:58:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gscfq@t-online.de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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 target_milestone
Message-ID: <bug-87711-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: 2018-10/txt/msg01955.txt.bz2
Content-length: 1390
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87711
Bug ID: 87711
Summary: ICE in gfc_trans_transfer, at fortran/trans-io.c:2676
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions down to at least 5 :
$ cat z1.f90
program p
character(3) :: c(2) = ['abc', 'xyz']
print *, len_trim(c, 4)
end
$ cat z2.f90
program p
character(3) :: c(2) = ['abc', 'xyz']
print *, len_trim(c, 8)
end
$ gfortran-9-20181021 -c z1.f90
z1.f90:3:0:
3 | print *, len_trim(c, 4)
|
internal compiler error: in gfc_trans_transfer, at fortran/trans-io.c:2676
0x718686 gfc_trans_transfer(gfc_code*)
../../gcc/fortran/trans-io.c:2676
0x6bdbc7 trans_code
../../gcc/fortran/trans.c:2038
0x715dae build_dt
../../gcc/fortran/trans-io.c:2026
0x6bdba7 trans_code
../../gcc/fortran/trans.c:2010
0x6e51c4 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6505
0x673426 translate_all_program_units
../../gcc/fortran/parse.c:6125
0x673426 gfc_parse_file()
../../gcc/fortran/parse.c:6328
0x6ba3ff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204
>From gcc-bugs-return-618574-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:07:36 2018
Return-Path: <gcc-bugs-return-618574-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 53686 invoked by alias); 23 Oct 2018 17:07:36 -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 53637 invoked by uid 48); 23 Oct 2018 17:07:32 -0000
From: "mihail.zenkov at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/87702] [6/7/8/9 Regression] Segfault in glibc if compiled with -march=amdfam10 -O2 (x86)
Date: Tue, 23 Oct 2018 17:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 8.2.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mihail.zenkov at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-87702-4-5BL65k9Mj3@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87702-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87702-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: 2018-10/txt/msg01956.txt.bz2
Content-length: 838
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87702
--- Comment #2 from Mihail Zenkov <mihail.zenkov at gmail dot com> ---
I'm not sure how to reproduce this regressions without rebuilding glibc. But I
can provide prebuilded glibc for test.
http://www.knk.uwebweb.com/glibc-segfault.tar.xz
To reproduce just unpack and run ./test.sh. You should see:
./test.sh
Regression 1
busybox ld.so libc_regression_1.so
libc_regression_2.so test.sh
BusyBox v1.29.3 (2018-10-18 20:28:02 BY) multi-call binary.
Usage: rm [-irf] FILE...
Remove (unlink) FILEs
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
Segmentation fault
Regression 2
busybox ld.so libc_regression_1.so
libc_regression_2.so test.sh
Segmentation fault
>From gcc-bugs-return-618575-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:17:32 2018
Return-Path: <gcc-bugs-return-618575-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 71636 invoked by alias); 23 Oct 2018 17:17:32 -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 71574 invoked by uid 55); 23 Oct 2018 17:17:28 -0000
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/86687] Wrong debug information for string types passed as parameters
Date: Tue, 23 Oct 2018 17:17:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 7.1.0
X-Bugzilla-Keywords: patch, wrong-debug
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vries at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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-86687-4-dPPzpL4eAW@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-86687-4@http.gcc.gnu.org/bugzilla/>
References: <bug-86687-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: 2018-10/txt/msg01957.txt.bz2
Content-length: 2278
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86687
--- Comment #17 from Tom de Vries <vries at gcc dot gnu.org> ---
Author: vries
Date: Tue Oct 23 17:16:55 2018
New Revision: 265431
URL: https://gcc.gnu.org/viewcvs?rev=265431&root=gcc&view=rev
Log:
backport "[c++] Fix DECL_BY_REFERENCE of clone parms"
Consider test.C compiled at -O0 -g:
...
class string {
public:
string (const char *p) { this->p = p ; }
string (const string &s) { this->p = s.p; }
private:
const char *p;
};
class foo {
public:
foo (string dir_hint) {}
};
int
main (void)
{
std::string s = "This is just a string";
foo bar(s);
return 0;
}
...
When parsing foo::foo, the dir_hint parameter gets a DECL_ARG_TYPE of
'struct string & restrict'. Then during finish_struct, we call
clone_constructors_and_destructors and create clones for foo::foo, and
set the DECL_ARG_TYPE in the same way.
Later on, during finish_function, cp_genericize is called for the original
foo::foo, which sets the type of parm dir_hint to DECL_ARG_TYPE, and sets
DECL_BY_REFERENCE of dir_hint to 1.
After that, during maybe_clone_body update_cloned_parm is called with:
...
(gdb) call debug_generic_expr (parm.typed.type)
struct string & restrict
(gdb) call debug_generic_expr (cloned_parm.typed.type)
struct string
...
The type of the cloned_parm is then set to the type of parm, but
DECL_BY_REFERENCE is not set.
When doing cp_genericize for the clone later on,
TREE_ADDRESSABLE (TREE_TYPE ()) is no longer true for the updated type for
the parm, so DECL_BY_REFERENCE is not set there either.
The missing DECL_BY_REFERENCE on cloned_parm causes incorrect debug info to be
generated.
This patch fixes the problem by copying DECL_BY_REFERENCE in
update_cloned_parm.
Bootstrapped and reg-tested on x86_64.
2018-10-23 Tom de Vries <tdevries@suse.de>
backport from trunk:
2018-07-31 Tom de Vries <tdevries@suse.de>
PR debug/86687
* optimize.c (update_cloned_parm): Copy DECL_BY_REFERENCE.
* g++.dg/guality/pr86687.C: New test.
Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/guality/pr86687.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/optimize.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
>From gcc-bugs-return-618576-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:19:11 2018
Return-Path: <gcc-bugs-return-618576-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 85475 invoked by alias); 23 Oct 2018 17:19: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 85386 invoked by uid 48); 23 Oct 2018 17:19:07 -0000
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/86687] Wrong debug information for string types passed as parameters
Date: Tue, 23 Oct 2018 17:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 7.1.0
X-Bugzilla-Keywords: patch, wrong-debug
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vries at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
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 resolution
Message-ID: <bug-86687-4-KIUND8ui7w@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-86687-4@http.gcc.gnu.org/bugzilla/>
References: <bug-86687-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: 2018-10/txt/msg01958.txt.bz2
Content-length: 521
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86687
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #18 from Tom de Vries <vries at gcc dot gnu.org> ---
patch with test-case committed to trunk, backported to release branches 6,7,8.
Marking resolved-fixed.
>From gcc-bugs-return-618577-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:22:34 2018
Return-Path: <gcc-bugs-return-618577-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 94749 invoked by alias); 23 Oct 2018 17:22: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 94401 invoked by uid 48); 23 Oct 2018 17:22:29 -0000
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87699] Implement CWG 1512
Date: Tue, 23 Oct 2018 17:22: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: 9.0
X-Bugzilla-Keywords: accepts-invalid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: msebor at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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: see_also
Message-ID: <bug-87699-4-qXvXgtrAMa@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87699-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87699-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: 2018-10/txt/msg01959.txt.bz2
Content-length: 571
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87699
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=81453
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
I raised bug 81453 for this against the C front end, but only to move the
warning GCC issues with -Wextra to -Wall.
>From gcc-bugs-return-618578-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:26:08 2018
Return-Path: <gcc-bugs-return-618578-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 102650 invoked by alias); 23 Oct 2018 17:26:07 -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 102544 invoked by uid 48); 23 Oct 2018 17:26:02 -0000
From: "barry.revzin at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87712] New: class template argument deduction fails with wrapped parentheses
Date: Tue, 23 Oct 2018 17:26: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: 9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: barry.revzin at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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 target_milestone
Message-ID: <bug-87712-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: 2018-10/txt/msg01960.txt.bz2
Content-length: 847
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87712
Bug ID: 87712
Summary: class template argument deduction fails with wrapped
parentheses
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from https://stackoverflow.com/q/52950967/2069064:
template <class T>
struct lit {
lit(T );
};
template <typename T>
void operator+(lit<T>, int);
int main() {
auto a = lit('b'); // ok
auto b = (lit('b')); // ok
lit('b') + 1; // ok
(lit('b')) + 1; // error: missing template arguments after 'lit'
(lit('b') + 1); // ok
}
>From gcc-bugs-return-618579-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:29:13 2018
Return-Path: <gcc-bugs-return-618579-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 105362 invoked by alias); 23 Oct 2018 17:29:12 -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 105330 invoked by uid 48); 23 Oct 2018 17:29:08 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87712] class template argument deduction fails with wrapped parentheses
Date: Tue, 23 Oct 2018 17:29: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: 9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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: cc
Message-ID: <bug-87712-4-UeSXsAR1sL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87712-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87712-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: 2018-10/txt/msg01961.txt.bz2
Content-length: 417
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87712
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This is likely a dup of 87709.
>From gcc-bugs-return-618580-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:33:20 2018
Return-Path: <gcc-bugs-return-618580-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 110375 invoked by alias); 23 Oct 2018 17:33:20 -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 110252 invoked by uid 48); 23 Oct 2018 17:33:15 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87712] class template argument deduction fails with wrapped parentheses
Date: Tue, 23 Oct 2018 17:33: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: 9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: DUPLICATE
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 resolution
Message-ID: <bug-87712-4-HXYtV60F3N@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87712-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87712-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: 2018-10/txt/msg01962.txt.bz2
Content-length: 508
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87712
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Looks almost identical.
*** This bug has been marked as a duplicate of bug 87709 ***
>From gcc-bugs-return-618581-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:33:21 2018
Return-Path: <gcc-bugs-return-618581-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 110553 invoked by alias); 23 Oct 2018 17:33:21 -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 110281 invoked by uid 48); 23 Oct 2018 17:33:16 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87709] c++17 class template argument deduction not working in a very specific case
Date: Tue, 23 Oct 2018 17:33: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: 8.2.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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: cc
Message-ID: <bug-87709-4-Hmra9hZJXA@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87709-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87709-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: 2018-10/txt/msg01963.txt.bz2
Content-length: 448
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87709
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |barry.revzin at gmail dot com
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 87712 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-618582-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:34:36 2018
Return-Path: <gcc-bugs-return-618582-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 112966 invoked by alias); 23 Oct 2018 17:34: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 112645 invoked by uid 48); 23 Oct 2018 17:34:30 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/87702] [6/7/8/9 Regression] Segfault in glibc if compiled with -march=amdfam10 -O2 (x86)
Date: Tue, 23 Oct 2018 17:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 8.2.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-87702-4-LWvxZLFfuz@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87702-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87702-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: 2018-10/txt/msg01964.txt.bz2
Content-length: 2499
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87702
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Mihail Zenkov from comment #2)
> I'm not sure how to reproduce this regressions without rebuilding glibc. But
> I can provide prebuilded glibc for test.
>
> http://www.knk.uwebweb.com/glibc-segfault.tar.xz
>
> To reproduce just unpack and run ./test.sh. You should see:
>
> ./test.sh
> Regression 1
> busybox ld.so libc_regression_1.so
> libc_regression_2.so test.sh
> BusyBox v1.29.3 (2018-10-18 20:28:02 BY) multi-call binary.
>
> Usage: rm [-irf] FILE...
>
> Remove (unlink) FILEs
>
> -i Always prompt before removing
> -f Never prompt
> -R,-r Recurse
> Segmentation fault
This one is unaligned access in function __run_exit_handlers:
0xf7e2404d <+173>: je 0xf7e24050 <__run_exit_handlers+176>
0xf7e2404f <+175>: lock cmpxchg %ecx,(%esi)
0xf7e24053 <+179>: je 0xf7e2405c <__run_exit_handlers+188>
0xf7e24055 <+181>: lea (%esi),%ecx
0xf7e24057 <+183>: call 0xf7efd6b0 <__lll_lock_wait_private>
0xf7e2405c <+188>: movq 0x3720(%ebp),%xmm0
=> 0xf7e24064 <+196>: movdqa (%esp),%xmm1
0xf7e24069 <+201>: pxor %xmm0,%xmm1
0xf7e2406d <+205>: movdqa %xmm1,%xmm0
0xf7e24071 <+209>: movd %xmm0,%ecx
0xf7e24075 <+213>: psrlq $0x20,%xmm0
0xf7e2407a <+218>: movd %xmm0,%eax
0xf7e2407e <+222>: or %ecx,%eax
0xf7e24080 <+224>: jne 0xf7e23ffe <__run_exit_handlers+94>
(gdb) p $esp
$1 = (void *) 0xffffc3c8
>
> Regression 2
> busybox ld.so libc_regression_1.so
> libc_regression_2.so test.sh
> Segmentation fault
This one is in function _IO_vfscanf_internal:
0xf7e6fe26 <+326>: movaps -0x5f210(%ecx),%xmm1
0xf7e6fe2d <+333>: movapd -0x5f280(%ecx),%xmm2
0xf7e6fe35 <+341>: mov %esi,-0x5b0(%ebp)
0xf7e6fe3b <+347>: movl $0x0,-0x5b4(%ebp)
=> 0xf7e6fe45 <+357>: movaps %xmm1,-0x5e8(%ebp)
0xf7e6fe4c <+364>: movl $0x0,-0x594(%ebp)
0xf7e6fe56 <+374>: movl $0x0,-0x5bc(%ebp)
0xf7e6fe60 <+384>: movl $0x0,-0x5c8(%ebp)
(gdb) p $ebp
$1 = (void *) 0xffffc040
So, the best way to proceed is to isolate mentioned functions and feed them
with some test data to prepare a failing runtime testcase. Please also post
preprocessed source of failing functions, so we can see where unaligned access
comes from.
>From gcc-bugs-return-618583-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:37:32 2018
Return-Path: <gcc-bugs-return-618583-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5276 invoked by alias); 23 Oct 2018 17:37: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 5126 invoked by uid 48); 23 Oct 2018 17:37:27 -0000
From: "barry.revzin at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87712] class template argument deduction fails with wrapped parentheses
Date: Tue, 23 Oct 2018 17:37: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: 9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: barry.revzin at gmail dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: DUPLICATE
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-87712-4-tHU7EmS66b@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87712-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87712-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: 2018-10/txt/msg01965.txt.bz2
Content-length: 177
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87712
--- Comment #3 from Barry Revzin <barry.revzin at gmail dot com> ---
Didn't realize the OP had filed a bug report already.
>From gcc-bugs-return-618584-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 17:46:22 2018
Return-Path: <gcc-bugs-return-618584-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 38955 invoked by alias); 23 Oct 2018 17:46:18 -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 38526 invoked by uid 48); 23 Oct 2018 17:46:00 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/87702] [6/7/8/9 Regression] Segfault in glibc if compiled with -march=amdfam10 -O2 (x86)
Date: Tue, 23 Oct 2018 17:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 8.2.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-87702-4-KiZCZwIxHx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87702-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87702-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: 2018-10/txt/msg01966.txt.bz2
Content-length: 4178
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87702
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #3)
> (In reply to Mihail Zenkov from comment #2)
> > I'm not sure how to reproduce this regressions without rebuilding glibc. But
> > I can provide prebuilded glibc for test.
> >
> > http://www.knk.uwebweb.com/glibc-segfault.tar.xz
> >
> > To reproduce just unpack and run ./test.sh. You should see:
> >
> > ./test.sh
> > Regression 1
> > busybox ld.so libc_regression_1.so
> > libc_regression_2.so test.sh
> > BusyBox v1.29.3 (2018-10-18 20:28:02 BY) multi-call binary.
> >
> > Usage: rm [-irf] FILE...
> >
> > Remove (unlink) FILEs
> >
> > -i Always prompt before removing
> > -f Never prompt
> > -R,-r Recurse
> > Segmentation fault
>
> This one is unaligned access in function __run_exit_handlers:
>
> 0xf7e2404d <+173>: je 0xf7e24050 <__run_exit_handlers+176>
> 0xf7e2404f <+175>: lock cmpxchg %ecx,(%esi)
> 0xf7e24053 <+179>: je 0xf7e2405c <__run_exit_handlers+188>
> 0xf7e24055 <+181>: lea (%esi),%ecx
> 0xf7e24057 <+183>: call 0xf7efd6b0 <__lll_lock_wait_private>
> 0xf7e2405c <+188>: movq 0x3720(%ebp),%xmm0
> => 0xf7e24064 <+196>: movdqa (%esp),%xmm1
> 0xf7e24069 <+201>: pxor %xmm0,%xmm1
> 0xf7e2406d <+205>: movdqa %xmm1,%xmm0
> 0xf7e24071 <+209>: movd %xmm0,%ecx
> 0xf7e24075 <+213>: psrlq $0x20,%xmm0
> 0xf7e2407a <+218>: movd %xmm0,%eax
> 0xf7e2407e <+222>: or %ecx,%eax
> 0xf7e24080 <+224>: jne 0xf7e23ffe <__run_exit_handlers+94>
>
> (gdb) p $esp
> $1 = (void *) 0xffffc3c8
Program received signal SIGSEGV, Segmentation fault.
0xf7e24064 in __run_exit_handlers (status=1, listp=0xf7fca3fc <__exit_funcs>,
run_list_atexit=true, run_dtors=true)
at exit.c:114
warning: Source file is more recent than executable.
114 if (__glibc_unlikely (new_exitfn_called !=
__new_exitfn_called))
(gdb) list
109 break;
110 }
111 /* Re-lock again before looking at global state. */
112 __libc_lock_lock (__exit_funcs_lock);
113
114 if (__glibc_unlikely (new_exitfn_called !=
__new_exitfn_called))
115 /* The last exit function, or another thread, has
registered
116 more exit functions. Start the loop over. */
117 goto restart;
118 }
>
> >
> > Regression 2
> > busybox ld.so libc_regression_1.so
> > libc_regression_2.so test.sh
> > Segmentation fault
>
> This one is in function _IO_vfscanf_internal:
>
> 0xf7e6fe26 <+326>: movaps -0x5f210(%ecx),%xmm1
> 0xf7e6fe2d <+333>: movapd -0x5f280(%ecx),%xmm2
> 0xf7e6fe35 <+341>: mov %esi,-0x5b0(%ebp)
> 0xf7e6fe3b <+347>: movl $0x0,-0x5b4(%ebp)
> => 0xf7e6fe45 <+357>: movaps %xmm1,-0x5e8(%ebp)
> 0xf7e6fe4c <+364>: movl $0x0,-0x594(%ebp)
> 0xf7e6fe56 <+374>: movl $0x0,-0x5bc(%ebp)
> 0xf7e6fe60 <+384>: movl $0x0,-0x5c8(%ebp)
>
> (gdb) p $ebp
> $1 = (void *) 0xffffc040
Program received signal SIGSEGV, Segmentation fault.
_IO_vfscanf_internal (s=0xffffc068, format=0x80ae357
"%llu%llu%u%u%u%u%u%u%llu%llu%u%u%u%u%u%u",
argptr=0xffffc140
"\354\273\v\bÜ»\v\b\374\273\v\b\004\274\v\b,\274\v\b(\274\v\b\020\274\v\b\f\274\v\b\364\273\v\b\344\273\v\b",
errp=0x0) at vfscanf.c:2447
warning: Source file is more recent than executable.
2447 *ARG (float *) = negative ? -d : d;
(gdb) list
2442 else
2443 {
2444 float d = __strtof_internal
2445 (char_buffer_start (&charbuf), &tw, flags & GROUP);
2446 if (!(flags & SUPPRESS) && tw != char_buffer_start
(&charbuf))
2447 *ARG (float *) = negative ? -d : d;
2448 }
2449
2450 if (__glibc_unlikely (tw == char_buffer_start (&charbuf)))
2451 conv_error ();
>From gcc-bugs-return-618585-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 18:21:05 2018
Return-Path: <gcc-bugs-return-618585-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 82179 invoked by alias); 23 Oct 2018 18:21:04 -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 81872 invoked by uid 48); 23 Oct 2018 18:20:59 -0000
From: "ygribov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/87633] [9 Regression] ice in compare_range_wit h_value, at vr-values.c:1702
Date: Tue, 23 Oct 2018 18:21:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ygribov at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ygribov at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-87633-4-ffuILukHrB@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87633-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87633-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: 2018-10/txt/msg01967.txt.bz2
Content-length: 421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87633
Yury Gribov <ygribov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Yury Gribov <ygribov at gcc dot gnu.org> ---
.
>From gcc-bugs-return-618586-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 18:27:39 2018
Return-Path: <gcc-bugs-return-618586-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 92223 invoked by alias); 23 Oct 2018 18:27:38 -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 92136 invoked by uid 48); 23 Oct 2018 18:27:33 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/87702] [6/7/8/9 Regression] Segfault in glibc if compiled with -march=amdfam10 -O2 (x86)
Date: Tue, 23 Oct 2018 18:27:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 8.2.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-87702-4-qsWl9hiLcA@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87702-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87702-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: 2018-10/txt/msg01968.txt.bz2
Content-length: 2370
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87702
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #4)
> Program received signal SIGSEGV, Segmentation fault.
> 0xf7e24064 in __run_exit_handlers (status=1, listp=0xf7fca3fc
> <__exit_funcs>, run_list_atexit=true, run_dtors=true)
> at exit.c:114
> warning: Source file is more recent than executable.
> 114 if (__glibc_unlikely (new_exitfn_called !=
> __new_exitfn_called))
>
> (gdb) list
> 109 break;
> 110 }
> 111 /* Re-lock again before looking at global state. */
> 112 __libc_lock_lock (__exit_funcs_lock);
> 113
> 114 if (__glibc_unlikely (new_exitfn_called !=
> __new_exitfn_called))
> 115 /* The last exit function, or another thread, has
> registered
> 116 more exit functions. Start the loop over. */
> 117 goto restart;
> 118 }
Here is what happens:
0xf7e2405c <+188>: movq 0x3720(%ebp),%xmm0
2> 0xf7e24064 <+196>: movdqa (%esp),%xmm1
0xf7e24069 <+201>: pxor %xmm0,%xmm1
0xf7e2406d <+205>: movdqa %xmm1,%xmm0
0xf7e24071 <+209>: movd %xmm0,%ecx
0xf7e24075 <+213>: psrlq $0x20,%xmm0
0xf7e2407a <+218>: movd %xmm0,%eax
0xf7e2407e <+222>: or %ecx,%eax
0xf7e24080 <+224>: jne 0xf7e23ffe <__run_exit_handlers+94>
0xf7e24086 <+230>: mov 0x4(%edi),%ecx
0xf7e24089 <+233>: test %ecx,%ecx
0xf7e2408b <+235>: je 0xf7e24110 <__run_exit_handlers+368>
0xf7e24091 <+241>: lea -0x1(%ecx),%eax
0xf7e24094 <+244>: mov 0x3724(%ebp),%edx
0xf7e2409a <+250>: mov %eax,0x4(%edi)
0xf7e2409d <+253>: mov 0x3720(%ebp),%eax
1> 0xf7e240a3 <+259>: mov %edx,0x4(%esp)
0xf7e240a7 <+263>: mov %eax,(%esp)
At 1>, new_exitfn_called is copied from __new_exitfn_called to a stack
location. At point 2>, the (unaligned) location is accessed with full 128 bit
movdqa access (which seems wrong, probably movq should be emitted here).
Please provide a preprocessed source of exit.c (the file is called exit.i and
can be generated by adding --save-temps to the compile command that compiled
exit.c) from the build and the exact compile flags that produce the above
assembly.
>From gcc-bugs-return-618587-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 18:36:21 2018
Return-Path: <gcc-bugs-return-618587-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 113344 invoked by alias); 23 Oct 2018 18:36:21 -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 113283 invoked by uid 48); 23 Oct 2018 18:36:16 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/87702] [6/7/8/9 Regression] Segfault in glibc if compiled with -march=amdfam10 -O2 (x86)
Date: Tue, 23 Oct 2018 18:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 8.2.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-87702-4-HQWTCHm4Vu@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87702-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87702-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: 2018-10/txt/msg01969.txt.bz2
Content-length: 1276
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87702
--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #4)
> Program received signal SIGSEGV, Segmentation fault.
> _IO_vfscanf_internal (s=0xffffc068, format=0x80ae357
> "%llu%llu%u%u%u%u%u%u%llu%llu%u%u%u%u%u%u",
> argptr=0xffffc140
> "\354\273\v\bÜ»\v\b\374\273\v\b\004\274\v\b,
> \274\v\b(\274\v\b\020\274\v\b\f\274\v\b\364\273\v\b\344\273\v\b", errp=0x0)
> at vfscanf.c:2447
> warning: Source file is more recent than executable.
> 2447 *ARG (float *) = negative ? -d : d;
> (gdb) list
> 2442 else
> 2443 {
> 2444 float d = __strtof_internal
> 2445 (char_buffer_start (&charbuf), &tw, flags & GROUP);
> 2446 if (!(flags & SUPPRESS) && tw != char_buffer_start
> (&charbuf))
> 2447 *ARG (float *) = negative ? -d : d;
> 2448 }
> 2449
> 2450 if (__glibc_unlikely (tw == char_buffer_start (&charbuf)))
> 2451 conv_error ();
Also here, please provide preprocessed source of vfscanf.c from the build and
exact compile flags that will generate the failing assembly.
>From gcc-bugs-return-618588-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 18:38:40 2018
Return-Path: <gcc-bugs-return-618588-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 115580 invoked by alias); 23 Oct 2018 18:38:40 -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 115495 invoked by uid 48); 23 Oct 2018 18:38:34 -0000
From: "wilson at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/87690] [RISCV][ABI] GCC fails to sign-extend floats passed in the lp64 ABI
Date: Tue, 23 Oct 2018 18:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 9.0
X-Bugzilla-Keywords: ABI, wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: wilson at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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-87690-4-1wWOxWHqt1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-87690-4@http.gcc.gnu.org/bugzilla/>
References: <bug-87690-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: 2018-10/txt/msg01970.txt.bz2
Content-length: 1230
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87690
--- Comment #3 from Jim Wilson <wilson at gcc dot gnu.org> ---
As far as I know, combined tree builds for RISC-V have never worked. When
using a combined tree build, configure makes assumptions about gas/ld features
instead of doing run-time gas/ld checks. Because of our reliance on link time
optimization to reduce code size, we can't support some uses of
.uleb128/.sleb128 that expect code label differences to resolve to a constant,
since this is not a constant at assembly time for RISC-V. The result is that
the combined tree build gas/ld feature assumptions are wrong, and the build
fails. I haven't tried to fix this as combined tree builds are obsolete and
not recommended practice anymore.
I have been using the github riscv/riscv-gnu-toolchain for cross builds. I use
git remote add to add in the FSF git trees I want. You can do something like
this
git remote add upstream git://gcc.gnu.org/git/gcc.git
git fetch upstream
git checkout -b upstream-trunk --track upstream/trunk
You can do the same thing with binutils using
git://sourceware.org/git/binutils-gdb.git and master instead of trunk.
Another option is to use crosstool-NG.
>From gcc-bugs-return-618589-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 18:50:39 2018
Return-Path: <gcc-bugs-return-618589-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11107 invoked by alias); 23 Oct 2018 18:50:38 -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 11046 invoked by uid 48); 23 Oct 2018 18:50:34 -0000
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/87713] New: single character underlined in an error message instead of the whole token
Date: Tue, 23 Oct 2018 18:50: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: 9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: msebor at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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 target_milestone
Message-ID: <bug-87713-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: 2018-10/txt/msg01971.txt.bz2
Content-length: 1547
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87713
Bug ID: 87713
Summary: single character underlined in an error message
instead of the whole token
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
Every now and then I notice a diagnostic where only a single character of a
token (identifier?) is underlined but up until now I haven't had luck
reproducing it (often times it involves macros). The ill-formed C++ test case
below shows one situation when this happens without macros. Note the
underlining in the second error.
$ cat t.C && gcc -S -Wall t.C
int i = sizeof ((int));
t.C:1:18: error: expected primary-expression before âintâ
1 | int i = sizeof ((int));
| ^~~
t.C:1:18: error: expected â)â before âintâ
1 | int i = sizeof ((int));
| ~^~~
| )
t.C:1:23: error: expected â)â before â;â token
1 | int i = sizeof ((int));
| ~ ^
| )
Other C++ compilers as well as GCC's C front end handle this more gracefully.
They print just a single message along the lines of:
t.C:1:22: error: expected expression before â)â token
>From gcc-bugs-return-618590-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 23 18:50:41 2018
Return-Path: <gcc-bugs-return-618590-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11504 invoked by alias); 23 Oct 2018 18:50:41 -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 11429 invoked by uid 89); 23 Oct 2018 18:50:41 -0000
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=4.9 required=5.0 testsºYES_50,HTML_MESSAGE,MSGID_FROM_MTA_HEADER,RAZOR2_CF_RANGE_51_100,RAZOR2_CHECK,RCVD_IN_DNSWL_LOW,SPF_FAIL autolearn=no version=3.3.2 spammy=UD:googleusercontent.com, citizens, proxy, UPDATE
X-HELO: mail1.vodafone.ie
Received: from mail1.vodafone.ie (HELO mail1.vodafone.ie) (213.233.128.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Oct 2018 18:50:37 +0000
Authentication-Results: mail1.vodafone.ie; dkim=neutral (message not signed) header.i=none
Message-Id: <b7c273$69ia39@mail1.vodafone.ie>
Received: from unknown (HELO MWSC-TS) ([93.107.98.127]) by mail1.vodafone.ie with ESMTP; 23 Oct 2018 19:50:34 +0100
From: "Citizens Bank" <alerts@citizensbankonline.com>
Subject: Action needed
To: gcc-bugs@gcc.gnu.org
MIME-Version: 1.0
Date: Tue, 23 Oct 2018 18:50:00 -0000
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
X-SW-Source: 2018-10/txt/msg01972.txt.bz2
Content-length: 364
- This mail is in HTML. Some elements may be ommited in plain text. -
Dear customer,
Some Important data's on your Citizens profile has been missing.To Protect you,We have temporarily locked your account.Please,Kindly take a moment to update and have your account restored
UPDATE YOUR INFORMATIONS
.. We value your membership!
Thanks,
Citizens Bank
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/87697] Casting a base class to derived gives no warning
[not found] <bug-87697-4@http.gcc.gnu.org/bugzilla/>
2018-10-23 15:18 ` [Bug c++/87697] Casting a base class to derived gives no warning jynelson at email dot sc.edu
@ 2022-12-23 14:54 ` arthur.j.odwyer at gmail dot com
1 sibling, 0 replies; 2+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2022-12-23 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87697
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arthur.j.odwyer at gmail dot com
--- Comment #4 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
jynelson: Static-casting from Base& to Derived& is the foundation of the
"Curiously Recurring Template Pattern" in C++, and therefore can't be allowed
to trigger any diagnostic with -Wall -Wextra. (Many industry codebases build
with -Wall -Wextra, and also use the CRTP.)
*Aside* from that practical consideration, I don't think there's anything wrong
with casting from one type to another. The point of type-cast syntax is to say
"Don't worry, compiler, I know what I'm doing." If one doesn't know what one's
doing, then one shouldn't use casts at all, and just stick to the implicit
conversions. It's already an error to *implicitly convert* from Base& to
Derived&, so if you stick to implicit conversions you'll get exactly the
behavior you want.
Suggest closing this issue as NOTABUG.
But see also #96765 (for this kind of cast specifically *inside a
constructor*).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-23 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-87697-4@http.gcc.gnu.org/bugzilla/>
2018-10-23 15:18 ` [Bug c++/87697] Casting a base class to derived gives no warning jynelson at email dot sc.edu
2022-12-23 14:54 ` arthur.j.odwyer at gmail dot com
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).