public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99] Bug in template type in error message.
Date: Sun, 13 Apr 2014 18:09:00 -0000	[thread overview]
Message-ID: <bug-99-4-FfFFjPScMd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot com

--- Comment #21 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Christian Ehrhardt from comment #5)
> From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
> To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, carlo@alinoe.com,
>   gdr@gcc.gnu.org, gcc-prs@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de
> Cc:  
> Subject: Re: c++/99: [2003-03-26] Bug in type in error message.
> Date: Tue, 6 May 2003 15:04:23 +0200
> 
>  Here's a further reduced testcase, along with some more analysis:
>  
>   template<typename S> class X {};
>   template<typename Q> int f(X<int>, X<Q>);
>   template<typename B> int f(X<B>, X<int>);
>  
>   int main(void) {
>      return f(X<int>(), X<int>());
>   }
>  

For this testcase, the problem is that:

(gdb) p debug_tree(arglist)
 <tree_vec 0x7ffff7570d40
    elt 0 <template_type_parm 0x7ffff7566348 Q VOID
        align 8 symtab 0 alias set -1 canonical type 0x7ffff7566150
       index 0 level 1 orig_level 1
        chain <type_decl 0x7ffff755fc38 Q>>>

and

(gdb) p debug_tree(arglist)
 <tree_vec 0x7ffff7570e60
    elt 0 <template_type_parm 0x7ffff7566690 B VOID
        align 8 symtab 0 alias set -1 canonical type 0x7ffff7566150
       index 0 level 1 orig_level 1
        chain <type_decl 0x7ffff755ff18 B>>>

have the same hash:

(gdb) p hash
$128 = 3284467468

I am not sure whether we should change the hashing function or whether we
should add some additional check. But what kind of check?
>From gcc-bugs-return-448922-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Apr 13 18:19:29 2014
Return-Path: <gcc-bugs-return-448922-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13549 invoked by alias); 13 Apr 2014 18:19:29 -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 13527 invoked by uid 48); 13 Apr 2014 18:19:25 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/53063] encode group options in the .opt files
Date: Sun, 13 Apr 2014 18:19: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-53063-4-ALMz4i5gQy@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-53063-4@http.gcc.gnu.org/bugzilla/>
References: <bug-53063-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: 2014-04/txt/msg00942.txt.bz2
Content-length: 1432

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-04-13
     Ever confirmed|0                           |1

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
In order to fully fix this, we would need to handle also CPP options, in order
to auto-generate this code:

  /* Wlong-long is disabled by default. It is enabled by:
      [-Wpedantic | -Wtraditional] -std=[gnu|c]++98 ; or
      [-Wpedantic | -Wtraditional] -std=non-c99 .

      Either -Wlong-long or -Wno-long-long override any other settings.  */
  if (warn_long_long == -1)
    warn_long_long = ((pedantic || warn_traditional)
                      && (c_dialect_cxx () ? cxx_dialect == cxx98 :
!flag_isoc99));
  cpp_opts->cpp_warn_long_long = warn_long_long;

  /* Similarly with -Wno-variadic-macros.  No check for c99 here, since
     this also turns off warnings about GCCs extension.  */
  cpp_opts->warn_variadic_macros
    = cpp_warn_variadic_macros && (pedantic || warn_traditional);

There also a few options in c_common_post_options that have not been converted
to the new mechanism yet.
>From gcc-bugs-return-448923-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Apr 13 19:11:57 2014
Return-Path: <gcc-bugs-return-448923-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3428 invoked by alias); 13 Apr 2014 19:11:55 -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 3373 invoked by uid 48); 13 Apr 2014 19:11:48 -0000
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60834] New: [OOP] ICE with ASSOCIATE  construct (gimplify_var_or_parm_decl, at gimplify.c:1721)
Date: Sun, 13 Apr 2014 19:11: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: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: burnus at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter
Message-ID: <bug-60834-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: 2014-04/txt/msg00943.txt.bz2
Content-length: 983

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`834

            Bug ID: 60834
           Summary: [OOP] ICE with ASSOCIATE  construct
                    (gimplify_var_or_parm_decl, at gimplify.c:1721)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

The following code ICEs with -O1 but not with -O0:


module m
  implicit none
  type :: t
    real :: diffusion=1.
  end type
contains
  subroutine solve(this, x)
    class(t), intent(in) :: this
    real, intent(in) :: x(:)
    integer :: i
    integer, parameter :: n(1:5)=[(i,i=1, 5)]

    associate( nu=>this%diffusion)
      associate( exponential=>exp(-(x(i)-n) ))
        do i = 1, size(x)
        end do
      end associate
    end associate
  end subroutine solve
end module m


  parent reply	other threads:[~2014-04-13 18:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-99-4@http.gcc.gnu.org/bugzilla/>
2012-10-09 18:48 ` manu at gcc dot gnu.org
2014-04-13 16:49 ` manu at gcc dot gnu.org
2014-04-13 18:09 ` manu at gcc dot gnu.org [this message]
2014-04-13 19:25 ` manu at gcc dot gnu.org
2021-09-06  6:14 ` pinskia at gcc dot gnu.org
2021-10-01 10:06 ` egallager at gcc dot gnu.org
     [not found] <bug-99-797@http.gcc.gnu.org/bugzilla/>
2005-11-07 15:38 ` reichelt at gcc dot gnu dot org
2007-03-29 15:28 ` bangerth at dealii dot org
2007-03-29 15:43   ` Gabriel Dos Reis
2007-03-29 15:44 ` gdr at cs dot tamu dot edu
2008-02-28 17:08 ` pinskia at gcc dot gnu dot org
2010-06-05 23:38 ` manu at gcc dot gnu dot org
2010-07-03 19:59 ` manu at gcc dot gnu dot org
     [not found] <20000312002600.99.martin@loewis.home.cs.tu-berlin.de>
2004-05-27 20:27 ` pinskia at gcc dot gnu dot org
2004-07-19 18:40 ` pinskia at gcc dot gnu dot org
2004-09-26  0:44 ` pinskia at gcc dot gnu dot org
2004-10-01 13:16 ` bangerth at dealii dot org
2005-03-04 14:51 ` pinskia at gcc dot gnu dot org
2005-03-04 15:05 ` bangerth at dealii dot org
2005-04-08 19:38 ` bangerth at dealii dot 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-99-4-FfFFjPScMd@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).