public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26559]  New: ICE with __builtin_constant_p in template argument
@ 2006-03-04 16:14 debian-gcc at lists dot debian dot org
  2006-03-04 16:20 ` [Bug c++/26559] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2006-03-04 16:14 UTC (permalink / raw)
  To: gcc-bugs

[forwarded from http://bugs.debian.org/353366]

gcc version 4.0.3 20060212 (prerelease) (Debian 4.0.2-9)

falk@juist:/tmp% cat bla.cc
template<bool> struct cond;

template<int> struct S {
    void f(int i) {
        cond<__builtin_constant_p(i)>();
    }
};

S<1> s;

falk@juist:/tmp% g++ -c bla.cc 
bla.cc: In member function 'void S<<anonymous> >::f(int)':
bla.cc:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

falk@juist:/tmp% g++-3.4 -c bla.cc 
bla.cc: In member function `void S<<anonymous> >::f(int)':
bla.cc:5: error: `int __builtin_constant_p(...)' cannot appear in a
constant-expression
bla.cc:5: error: `i' cannot appear in a constant-expression
bla.cc:5: error: a function call cannot appear in a constant-expression
bla.cc:5: error: template argument 1 is invalid


-- 
           Summary: ICE with __builtin_constant_p in template argument
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


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


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

* [Bug c++/26559] [4.0/4.1/4.2 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
@ 2006-03-04 16:20 ` pinskia at gcc dot gnu dot org
  2006-03-11  3:20 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-04 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-03-04 16:19 -------
Confirmed.
Backtrace:
htab_find_with_hash (htab=0x0, element=0x2aaaab15a320, hash=1432532068)
    at /home/pinskia/src/checkin/trunk/libiberty/hashtab.c:269
269       const struct prime_ent *p = &prime_tab[htab->size_prime_index];
(gdb) up
#1  0x0000000000434c9b in retrieve_local_specialization (tmpl=0x2aaaab15a320)
    at /home/pinskia/src/checkin/trunk/gcc/cp/pt.c:905
905                                               htab_hash_pointer (tmpl));
(gdb) 
#2  0x000000000044a2c8 in tsubst_copy (t=Variable "t" is not available.
) at /home/pinskia/src/checkin/trunk/gcc/cp/pt.c:7726
7726          r = retrieve_local_specialization (t);
(gdb) bt
#0  htab_find_with_hash (htab=0x0, element=0x2aaaab15a320, hash=1432532068)
    at /home/pinskia/src/checkin/trunk/libiberty/hashtab.c:269
#1  0x0000000000434c9b in retrieve_local_specialization (tmpl=0x2aaaab15a320)
    at /home/pinskia/src/checkin/trunk/gcc/cp/pt.c:905
#2  0x000000000044a2c8 in tsubst_copy (t=Variable "t" is not available.
) at /home/pinskia/src/checkin/trunk/gcc/cp/pt.c:7726
#3  0x000000000044b79c in tsubst_copy_and_build (t=0x2aaaab15a320, args=0x0,
complain=tf_error, 
    in_decl=0x0, function_p=0 '\0') at
/home/pinskia/src/checkin/trunk/gcc/cp/pt.c:8960
#4  0x000000000044c4c9 in tsubst_copy_and_build (t=0x2aaaab0efd20, args=0x0,
complain=tf_error, 
    in_decl=0x0, function_p=Variable "function_p" is not available.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-03-04 16:20:00
               date|                            |
            Summary|ICE with                    |[4.0/4.1/4.2 Regression] ICE
                   |__builtin_constant_p in     |with __builtin_constant_p in
                   |template argument           |template argument
   Target Milestone|---                         |4.0.3


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


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

* [Bug c++/26559] [4.0/4.1/4.2 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
  2006-03-04 16:20 ` [Bug c++/26559] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-03-11  3:20 ` mmitchel at gcc dot gnu dot org
  2006-06-04 17:57 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-03-11  3:20 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.3                       |4.0.4


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


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

* [Bug c++/26559] [4.0/4.1/4.2 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
  2006-03-04 16:20 ` [Bug c++/26559] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
  2006-03-11  3:20 ` mmitchel at gcc dot gnu dot org
@ 2006-06-04 17:57 ` mmitchel at gcc dot gnu dot org
  2006-06-14  2:16 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 17:57 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c++/26559] [4.0/4.1/4.2 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (2 preceding siblings ...)
  2006-06-04 17:57 ` mmitchel at gcc dot gnu dot org
@ 2006-06-14  2:16 ` mmitchel at gcc dot gnu dot org
  2006-06-15  3:35 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-14  2:16 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           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=26559


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

* [Bug c++/26559] [4.0/4.1/4.2 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (3 preceding siblings ...)
  2006-06-14  2:16 ` mmitchel at gcc dot gnu dot org
@ 2006-06-15  3:35 ` mmitchel at gcc dot gnu dot org
  2006-06-15  3:39 ` [Bug c++/26559] [4.0/4.1 " mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  3:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mmitchel at gcc dot gnu dot org  2006-06-15 03:26 -------
Subject: Bug 26559

Author: mmitchel
Date: Thu Jun 15 03:26:38 2006
New Revision: 114665

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114665
Log:
2006-06-14  Mark Mitchell  <mark@codesourcery.com>

        PR c++/26559
        * c-common.h (c_finish_omp_atomic): Adjust declaration.
        * c-omp.c (c_finish_omp_atomic): Return the expression to perform,
        rather than calling add_stmt on it.
        * c-parser.c (c_parser_omp_atomic): Adjust accordingly.

2006-06-14  Mark Mitchell  <mark@codesourcery.com>

        PR c++/26559
        * pt.c (tsubst_expr): Use finish_omp_atomic.
        (value_dependent_expression_p): All CALL_EXPRs are dependent.
        * semantics.c (finish_omp_atomic): Rework to use standard
        paradigms for handling non-dependent expressions.

2006-06-14  Mark Mitchell  <mark@codesourcery.com>

        PR c++/26559
        * g++.dg/template/builtin1.C: New test.
        * g++.dg/gomp/tpl-atomic-2.C: Remove XFAIL.

Added:
    trunk/gcc/testsuite/g++.dg/template/builtin1.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.h
    trunk/gcc/c-omp.c
    trunk/gcc/c-parser.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/gomp/tpl-atomic-2.C


-- 


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


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

* [Bug c++/26559] [4.0/4.1 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (4 preceding siblings ...)
  2006-06-15  3:35 ` mmitchel at gcc dot gnu dot org
@ 2006-06-15  3:39 ` mmitchel at gcc dot gnu dot org
  2006-06-15  5:29 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  3:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2006-06-15 03:35 -------
Fixed in 4.2.0.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 Regression] ICE|[4.0/4.1 Regression] ICE
                   |with __builtin_constant_p in|with __builtin_constant_p in
                   |template argument           |template argument


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


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

* [Bug c++/26559] [4.0/4.1 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (5 preceding siblings ...)
  2006-06-15  3:39 ` [Bug c++/26559] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2006-06-15  5:29 ` mmitchel at gcc dot gnu dot org
  2006-06-15  5:49 ` [Bug c++/26559] [4.0 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  5:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-06-15 05:29 -------
Subject: Bug 26559

Author: mmitchel
Date: Thu Jun 15 05:29:25 2006
New Revision: 114670

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114670
Log:
        PR c++/26559
        * pt.c (value_dependent_expression_p): All CALL_EXPRs are dependent.

        PR c++/26559
        * g++.dg/template/builtin1.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/builtin1.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/pt.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/26559] [4.0 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (6 preceding siblings ...)
  2006-06-15  5:29 ` mmitchel at gcc dot gnu dot org
@ 2006-06-15  5:49 ` mmitchel at gcc dot gnu dot org
  2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  5:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2006-06-15 05:29 -------
Fixed in 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.0/4.1 Regression] ICE    |[4.0 Regression] ICE with
                   |with __builtin_constant_p in|__builtin_constant_p in
                   |template argument           |template argument


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


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

* [Bug c++/26559] [4.0 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (7 preceding siblings ...)
  2006-06-15  5:49 ` [Bug c++/26559] [4.0 " mmitchel at gcc dot gnu dot org
@ 2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
  2006-06-29 12:17 ` jakub at gcc dot gnu dot org
  2007-02-03 16:19 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15  6:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-06-15 05:49 -------
Subject: Bug 26559

Author: mmitchel
Date: Thu Jun 15 05:49:19 2006
New Revision: 114671

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114671
Log:
        PR c++/26559
        * pt.c (tsubst_expr): Use finish_omp_atomic.
        (value_dependent_expression_p): All CALL_EXPRs are dependent.
        * semantics.c (finish_omp_atomic): Rework to use standard
        paradigms for handling non-dependent expressions.

Modified:
    trunk/gcc/cp/semantics.c


-- 


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


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

* [Bug c++/26559] [4.0 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (8 preceding siblings ...)
  2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
@ 2006-06-29 12:17 ` jakub at gcc dot gnu dot org
  2007-02-03 16:19 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-06-29 12:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2006-06-29 11:49 -------
Subject: Bug 26559

Author: jakub
Date: Thu Jun 29 11:49:07 2006
New Revision: 115067

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115067
Log:
2006-06-14  Mark Mitchell  <mark@codesourcery.com>

        PR c++/26559
        * c-common.h (c_finish_omp_atomic): Adjust declaration.
        * c-omp.c (c_finish_omp_atomic): Return the expression to perform,
        rather than calling add_stmt on it.
        * c-parser.c (c_parser_omp_atomic): Adjust accordingly.

        * pt.c (tsubst_expr): Use finish_omp_atomic.
        * semantics.c (finish_omp_atomic): Rework to use standard
        paradigms for handling non-dependent expressions.

        * g++.dg/gomp/tpl-atomic-2.C: Remove XFAIL.

Modified:
    branches/redhat/gcc-4_1-branch/gcc/ChangeLog
    branches/redhat/gcc-4_1-branch/gcc/c-common.h
    branches/redhat/gcc-4_1-branch/gcc/c-omp.c
    branches/redhat/gcc-4_1-branch/gcc/c-parser.c
    branches/redhat/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/redhat/gcc-4_1-branch/gcc/cp/pt.c
    branches/redhat/gcc-4_1-branch/gcc/cp/semantics.c
    branches/redhat/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/gomp/tpl-atomic-2.C


-- 


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


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

* [Bug c++/26559] [4.0 Regression] ICE with __builtin_constant_p in template argument
  2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
                   ` (9 preceding siblings ...)
  2006-06-29 12:17 ` jakub at gcc dot gnu dot org
@ 2007-02-03 16:19 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 16:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from gdr at gcc dot gnu dot org  2007-02-03 16:19 -------
Fixed in GCC-4.1.2


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.2


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


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

end of thread, other threads:[~2007-02-03 16:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-04 16:14 [Bug c++/26559] New: ICE with __builtin_constant_p in template argument debian-gcc at lists dot debian dot org
2006-03-04 16:20 ` [Bug c++/26559] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-03-11  3:20 ` mmitchel at gcc dot gnu dot org
2006-06-04 17:57 ` mmitchel at gcc dot gnu dot org
2006-06-14  2:16 ` mmitchel at gcc dot gnu dot org
2006-06-15  3:35 ` mmitchel at gcc dot gnu dot org
2006-06-15  3:39 ` [Bug c++/26559] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2006-06-15  5:29 ` mmitchel at gcc dot gnu dot org
2006-06-15  5:49 ` [Bug c++/26559] [4.0 " mmitchel at gcc dot gnu dot org
2006-06-15  6:01 ` mmitchel at gcc dot gnu dot org
2006-06-29 12:17 ` jakub at gcc dot gnu dot org
2007-02-03 16:19 ` gdr 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).