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

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).