public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12774] New: Type checking problems in templates
@ 2003-10-25 22:27 roger at eyesopen dot com
  2003-10-26  2:54 ` [Bug c++/12774] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: roger at eyesopen dot com @ 2003-10-25 22:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Type checking problems in templates
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: roger at eyesopen dot com
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu

The following example code demonstrates a mainline regression from atleast 3.2.x.

void Foo(double r[3][3])
{
}

void Baz()
{
   double m[3][3];
   Foo(m);
}

template <class T>
void Bar()
{
   double m[3][3];
   Foo(m);
}

int main()
{
   Baz();
   Bar<int>();
   return 0;
}

This example contains two seemling identical calls to Foo.  The first from
a normal function, Baz, compiles without a problem, the second call from
within a template, Bar, however results in the error message:

bob.cpp: In function `void Bar()':
bob.cpp:15: error: cannot convert `double (*)[3]' to `double (*)[3]' in argument
 passing

This is with 3.4 20031024 (experimental) with or without any additional flags.


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

* [Bug c++/12774] Type checking problems in templates
  2003-10-25 22:27 [Bug c++/12774] New: Type checking problems in templates roger at eyesopen dot com
@ 2003-10-26  2:54 ` pinskia at gcc dot gnu dot org
  2003-12-16 20:24 ` [Bug c++/12774] [3.4 Regression] " nathan at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-26  2:54 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-25 22:32:12
               date|                            |
   Target Milestone|---                         |3.4


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-25 22:32 -------
>From Phil's regression hunter: Search converges between 2003-07-08-trunk (#337) and 2003-07
-09-trunk (#338).


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

* [Bug c++/12774] [3.4 Regression] Type checking problems in templates
  2003-10-25 22:27 [Bug c++/12774] New: Type checking problems in templates roger at eyesopen dot com
  2003-10-26  2:54 ` [Bug c++/12774] " pinskia at gcc dot gnu dot org
@ 2003-12-16 20:24 ` nathan at gcc dot gnu dot org
  2003-12-26  2:07 ` [Bug c++/12774] [3.4 Regression] [ABI] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-12-16 20:24 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/12774] [3.4 Regression] [ABI] Type checking problems in templates
  2003-10-25 22:27 [Bug c++/12774] New: Type checking problems in templates roger at eyesopen dot com
  2003-10-26  2:54 ` [Bug c++/12774] " pinskia at gcc dot gnu dot org
  2003-12-16 20:24 ` [Bug c++/12774] [3.4 Regression] " nathan at gcc dot gnu dot org
@ 2003-12-26  2:07 ` pinskia at gcc dot gnu dot org
  2003-12-29 16:52 ` [Bug c++/12774] [3.4 Regression] " nathan at gcc dot gnu dot org
  2003-12-29 17:08 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-26  2:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-26 01:37 -------
ABI problem, patch here: <http://gcc.gnu.org/ml/gcc-patches/2003-12/msg01980.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
   Last reconfirmed|2003-12-05 04:06:38         |2003-12-26 01:37:26
               date|                            |
            Summary|[3.4 Regression] Type       |[3.4 Regression] [ABI] Type
                   |checking problems in        |checking problems in
                   |templates                   |templates


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


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

* [Bug c++/12774] [3.4 Regression] Type checking problems in templates
  2003-10-25 22:27 [Bug c++/12774] New: Type checking problems in templates roger at eyesopen dot com
                   ` (2 preceding siblings ...)
  2003-12-26  2:07 ` [Bug c++/12774] [3.4 Regression] [ABI] " pinskia at gcc dot gnu dot org
@ 2003-12-29 16:52 ` nathan at gcc dot gnu dot org
  2003-12-29 17:08 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-12-29 16:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2003-12-29 16:34 -------
2003-12-23  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/12774
	* typeck.c (comp_array_types): Fold non-dependent domains for
	ABI-1.


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


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


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

* [Bug c++/12774] [3.4 Regression] Type checking problems in templates
  2003-10-25 22:27 [Bug c++/12774] New: Type checking problems in templates roger at eyesopen dot com
                   ` (3 preceding siblings ...)
  2003-12-29 16:52 ` [Bug c++/12774] [3.4 Regression] " nathan at gcc dot gnu dot org
@ 2003-12-29 17:08 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-29 17:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-12-29 17:02 -------
Subject: Bug 12774

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2003-12-29 17:02:03

Modified files:
	gcc/cp         : ChangeLog typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: array1-1.C array1-2.C 

Log message:
	cp:
	PR c++/12774
	* typeck.c (comp_array_types): Fold non-dependent domains for
	ABI-1.
	testsuite:
	PR c++/12774
	* g++.dg/template/array1-1.C: New test.
	* g++.dg/template/array1-2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3840&r2=1.3841
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.517&r2=1.518
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3319&r2=1.3320
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/array1-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/array1-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

end of thread, other threads:[~2003-12-29 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-25 22:27 [Bug c++/12774] New: Type checking problems in templates roger at eyesopen dot com
2003-10-26  2:54 ` [Bug c++/12774] " pinskia at gcc dot gnu dot org
2003-12-16 20:24 ` [Bug c++/12774] [3.4 Regression] " nathan at gcc dot gnu dot org
2003-12-26  2:07 ` [Bug c++/12774] [3.4 Regression] [ABI] " pinskia at gcc dot gnu dot org
2003-12-29 16:52 ` [Bug c++/12774] [3.4 Regression] " nathan at gcc dot gnu dot org
2003-12-29 17:08 ` cvs-commit 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).