public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/65751] Bogus &L in error message
Date: Thu, 04 Jun 2015 19:14:00 -0000	[thread overview]
Message-ID: <bug-65751-4-Znae73hH7S@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65751-4@http.gcc.gnu.org/bugzilla/>

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

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

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #1)
> Shouldn't it be rather
> 
> @@ -3632,9 +3632,9 @@ gfc_check_pointer_assign (gfc_expr *lval
>  	       || (lvalue->ts.type == BT_DERIVED
>  		   && (lvalue->ts.u.derived->attr.is_bind_c
>  		       || lvalue->ts.u.derived->attr.sequence))))
> -	gfc_error ("Data-pointer-object &L must be unlimited "
> +	gfc_error ("Data-pointer-object at %L must be unlimited "
>  		   "polymorphic, a sequence derived type or of a "
> -		   "type with the BIND attribute assignment at %L "
> +		   "type with the BIND attribute assignment "
>  		   "to be compatible with an unlimited polymorphic "
>  		   "target", &lvalue->where);
>        else
> 
> ?

Yes, I think so too.

Dominique, this patch is obvious; if you care to commit this, please go ahead.

And I think an English error message that points out the place of the error is
more useful than a native-language one which doesn't, so I would favor 
backporting.
>From gcc-bugs-return-488121-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 04 20:42:22 2015
Return-Path: <gcc-bugs-return-488121-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 112732 invoked by alias); 4 Jun 2015 20:42: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 112704 invoked by uid 48); 4 Jun 2015 20:42:18 -0000
From: "svalorzen at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66421] New: G++ fails compilation when assigning tuple created with variadic template to auto variable
Date: Thu, 04 Jun 2015 20:42: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: svalorzen 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 attachments.created
Message-ID: <bug-66421-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: 2015-06/txt/msg00453.txt.bz2
Content-length: 3861

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

            Bug ID: 66421
           Summary: G++ fails compilation when assigning tuple created
                    with variadic template to auto variable
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: svalorzen at gmail dot com
  Target Milestone: ---

Created attachment 35697
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35697&action=edit
File generated with -save-temps

The following code contains two equivalent functions, one declaring a variable
with auto and the other specifying the variable type explicitly. The function
using auto fails to compile, although the two functions provided are
equivalent. clang++ successfully compiles the code:

    #include <tuple>

    template <size_t N, typename T, typename... Args>
    struct DimTupleImpl {
        using type = typename DimTupleImpl<N-1, T, Args..., T>::type;
    };

    template <typename T, typename... Args>
    struct DimTupleImpl<0, T, Args...> {
        using type = std::tuple<Args...>;
    };

    // Tuple with N elements all of type T
    template <size_t N, typename T>
    struct DimTuple {
        using type = typename DimTupleImpl<N, T>::type;
    };

    template <typename... Params>
    void foo(Params... params) {
        auto tuple = std::make_tuple((size_t)params...);
    }

    template <typename... Params>
    void bar(Params... params) {
        typename DimTuple<sizeof...(Params), size_t>::type tuple =
std::make_tuple((size_t)params...);
    }

    int main() {
        foo(1,2,3); // Fails, clang++ compiles it
        bar(1,2,3); // Compiles correctly
        return 0;
    }

# Compiled as: 

g++ -std=c++11 main.cpp

# Compiler output:

main.cpp: In instantiation of ‘void foo(Params ...) [with Params = {int, int,
int}]’:
main.cpp:30:14:   required from here
main.cpp:21:51: error: conversion from ‘std::tuple<long unsigned int, long
unsigned int, long unsigned int>’ to non-scalar type ‘std::tuple<long unsigned
int>’ requested
     auto tuple = std::make_tuple((size_t)params...);
                                                   ^
# System:

Lubuntu 15.04

# Compiler info:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9.2-10ubuntu13' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
>From gcc-bugs-return-488122-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 04 20:57:49 2015
Return-Path: <gcc-bugs-return-488122-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14549 invoked by alias); 4 Jun 2015 20:57:49 -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 14514 invoked by uid 48); 4 Jun 2015 20:57:45 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/66418] Optimize set_intersection when one list is much smaller and the other has random access
Date: Thu, 04 Jun 2015 20:57: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: 6.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: glisse 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-66418-4-hmHRGX40Gm@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66418-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66418-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg00454.txt.bz2
Content-length: 365

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf418

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Two relevant links to optimize set_intersection (they consider the intersection
of k sets, but the case k=2 is still interesting)

http://erikdemaine.org/papers/SODA2000/
http://erikdemaine.org/papers/ALENEX2001/

(I am sure there are many others)


  parent reply	other threads:[~2015-06-04 19:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13  9:12 [Bug fortran/65751] New: " burnus at gcc dot gnu.org
2015-04-13 13:46 ` [Bug fortran/65751] " dominiq at lps dot ens.fr
2015-06-04 19:14 ` tkoenig at gcc dot gnu.org [this message]
2015-06-05  9:58 ` manu at gcc dot gnu.org

Reply instructions:

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

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

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

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

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

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).