public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50626] New: ICE with non-variadic function arguments after variadic one
@ 2011-10-06  2:07 kyusic at gmail dot com
  2011-10-06  2:09 ` [Bug c++/50626] " kyusic at gmail dot com
  2011-10-06  9:41 ` [Bug c++/50626] [C++0x] " paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: kyusic at gmail dot com @ 2011-10-06  2:07 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50626
           Summary: ICE with non-variadic function arguments after
                    variadic one
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kyusic@gmail.com


ICE is raised with the following source code. I'm not sure if it's valid code.

===============================================
template <typename... T>
int f(T*... x, int y)
{
        return y;
}

int main()
{
        f(1);
        return 0;
}
=================================================

Following is the command line options and the compiler output.

=================================================
$ g++-4.6.1 -v -save-temps -std=c++0x -Wall haha.cc
Using built-in specs.
COLLECT_GCC=g++-4.6.1
COLLECT_LTO_WRAPPER=/usr/local/packages/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6.1/configure --prefix=/usr/local/packages/gcc-4.6.1
Thread model: posix
gcc version 4.6.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-Wall' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'

/usr/local/packages/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/cc1plus
-E -quiet -v -D_GNU_SOURCE haha.cc -mtune=generic -march=x86-64 -std=c++0x
-Wall -fpch-preprocess -o haha.ii
ignoring nonexistent directory
"/usr/local/packages/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/local/packages/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1

/usr/local/packages/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64-unknown-linux-gnu

/usr/local/packages/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/backward
 /usr/local/packages/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/local/packages/gcc-4.6.1/include

/usr/local/packages/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-Wall' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'

/usr/local/packages/gcc-4.6.1/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/cc1plus
-fpreprocessed haha.ii -quiet -dumpbase haha.cc -mtune=generic -march=x86-64
-auxbase haha -Wall -std=c++0x -version -o haha.s
GNU C++ (GCC) version 4.6.1 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.0,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.6.1 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.0,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 89dcf4f0326a9a75d3a96096777c9003
haha.cc: In function ‘int f(T* ..., int) [with T = {}]’:
haha.cc:9:5:   instantiated from here
haha.cc:4:9: internal compiler error: in tsubst_copy, at cp/pt.c:11305
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
========================================================


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

* [Bug c++/50626] ICE with non-variadic function arguments after variadic one
  2011-10-06  2:07 [Bug c++/50626] New: ICE with non-variadic function arguments after variadic one kyusic at gmail dot com
@ 2011-10-06  2:09 ` kyusic at gmail dot com
  2011-10-06  9:41 ` [Bug c++/50626] [C++0x] " paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: kyusic at gmail dot com @ 2011-10-06  2:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Gyusik Choe <kyusic at gmail dot com> 2011-10-06 02:09:22 UTC ---
Created attachment 25427
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25427
preporcessed file


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

* [Bug c++/50626] [C++0x] ICE with non-variadic function arguments after variadic one
  2011-10-06  2:07 [Bug c++/50626] New: ICE with non-variadic function arguments after variadic one kyusic at gmail dot com
  2011-10-06  2:09 ` [Bug c++/50626] " kyusic at gmail dot com
@ 2011-10-06  9:41 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-06  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.6.2, 4.7.0
         Resolution|                            |WORKSFORME
            Summary|ICE with non-variadic       |[C++0x] ICE with
                   |function arguments after    |non-variadic function
                   |variadic one                |arguments after variadic
                   |                            |one

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-06 09:41:01 UTC ---
Works for me with 4.6.2 and mainline.


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

end of thread, other threads:[~2011-10-06  9:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-06  2:07 [Bug c++/50626] New: ICE with non-variadic function arguments after variadic one kyusic at gmail dot com
2011-10-06  2:09 ` [Bug c++/50626] " kyusic at gmail dot com
2011-10-06  9:41 ` [Bug c++/50626] [C++0x] " paolo.carlini at oracle dot com

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