public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions
@ 2005-02-25 19:35 pinskia at gcc dot gnu dot org
  2005-02-25 19:46 ` [Bug c++/20208] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-25 19:35 UTC (permalink / raw)
  To: gcc-bugs

At -O1 and above, the following code ICE because well, the same reason why PR 2892 fails currently 
really:
extern "C" void abort();

template <typename T>
inline void *Foo (T arg) { return &arg[0]; }

int main () {
  int bry[2];
  if (Foo<int[2]>(bry) != bry)
    abort();
}

I filed this a seperate bug because well the ICE is a regression even though fixing PR 2892 will fix this 
also.

-- 
           Summary: [4.0 Regression] No array-to-pointer decay happens for
                    template functions
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 2892
             nThis:


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


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

* [Bug c++/20208] [4.0 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
@ 2005-02-25 19:46 ` pinskia at gcc dot gnu dot org
  2005-02-28 13:13 ` [Bug c++/20208] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-25 19:46 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
  2005-02-25 19:46 ` [Bug c++/20208] " pinskia at gcc dot gnu dot org
@ 2005-02-28 13:13 ` pinskia at gcc dot gnu dot org
  2005-03-01  1:24 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-28 13:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-28 01:42 -------
This has failed since at least 20040909.
The ICE is:
t1.cc:8: internal compiler error: in fold_convert, at fold-const.c:1952


-- 


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
  2005-02-25 19:46 ` [Bug c++/20208] " pinskia at gcc dot gnu dot org
  2005-02-28 13:13 ` [Bug c++/20208] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2005-03-01  1:24 ` pinskia at gcc dot gnu dot org
  2005-03-09  6:38 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-01  1:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-01 01:24 -------
: Search converges between 2004-06-08-trunk (#463) and 2004-06-10-trunk (#464).
Well obviously the regression was caused by (but the underlaying bug is still there):
2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>

        * tree-inline.c (setup_one_parameter): Likewise.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-01 01:24:10
               date|                            |


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-03-01  1:24 ` pinskia at gcc dot gnu dot org
@ 2005-03-09  6:38 ` mmitchel at gcc dot gnu dot org
  2005-03-09  6:43 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-03-09  6:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-03-09 06:37 -------
On what target does this fail?  It does not fail for me on
x86_64-unknown-linux-gnu, and neither does PR 2892.

-- 


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-03-09  6:38 ` mmitchel at gcc dot gnu dot org
@ 2005-03-09  6:43 ` pinskia at gcc dot gnu dot org
  2005-03-09  7:50 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-09  6:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-09 06:43 -------
x86-pc-linux-gnu, and powerpc-darwin.  Both fail the same way.  On x86_64-pc-linux-gnu with 
4.0.0 20050121, I get the ICE also.

Note this is at -O1 or above.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|                            |i686-pc-linux


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-03-09  6:43 ` pinskia at gcc dot gnu dot org
@ 2005-03-09  7:50 ` mmitchel at gcc dot gnu dot org
  2005-03-09 18:35 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-03-09  7:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-03-09  7:50 ` mmitchel at gcc dot gnu dot org
@ 2005-03-09 18:35 ` cvs-commit at gcc dot gnu dot org
  2005-03-09 18:52 ` cvs-commit at gcc dot gnu dot org
  2005-03-09 18:53 ` mmitchel at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-09 18:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-09 18:35 -------
Subject: Bug 20208

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-03-09 18:35:48

Modified files:
	gcc/cp         : ChangeLog pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: array13.C 

Log message:
	PR c++/20208
	* pt.c (tsubst_decl): Apply array-to-pointer and
	function-to-pointer conversions to function arguments.
	(regenerate_decl_from_template): Likewise.
	
	PR c++/20208
	* g++.dg/template/array13.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4657&r2=1.4658
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.980&r2=1.981
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5132&r2=1.5133
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/array13.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-03-09 18:35 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-09 18:52 ` cvs-commit at gcc dot gnu dot org
  2005-03-09 18:53 ` mmitchel at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-09 18:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-09 18:51 -------
Subject: Bug 20208

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	mmitchel@gcc.gnu.org	2005-03-09 18:51:43

Modified files:
	gcc/cp         : ChangeLog pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: array13.C 

Log message:
	PR c++/20208
	* pt.c (tsubst_decl): Apply array-to-pointer and
	function-to-pointer conversions to function arguments.
	(regenerate_decl_from_template): Likewise.
	
	PR c++/20208
	* g++.dg/template/array13.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.7&r2=1.4648.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.978.2.2&r2=1.978.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.28&r2=1.5084.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/array13.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/20208] [4.0/4.1 Regression] No array-to-pointer decay happens for template functions
  2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-03-09 18:52 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-09 18:53 ` mmitchel at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-03-09 18:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-03-09 18:53 -------
Fixed in GCC 4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2005-03-09 18:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-25 19:35 [Bug c++/20208] New: [4.0 Regression] No array-to-pointer decay happens for template functions pinskia at gcc dot gnu dot org
2005-02-25 19:46 ` [Bug c++/20208] " pinskia at gcc dot gnu dot org
2005-02-28 13:13 ` [Bug c++/20208] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-03-01  1:24 ` pinskia at gcc dot gnu dot org
2005-03-09  6:38 ` mmitchel at gcc dot gnu dot org
2005-03-09  6:43 ` pinskia at gcc dot gnu dot org
2005-03-09  7:50 ` mmitchel at gcc dot gnu dot org
2005-03-09 18:35 ` cvs-commit at gcc dot gnu dot org
2005-03-09 18:52 ` cvs-commit at gcc dot gnu dot org
2005-03-09 18:53 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).