public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paulotorrens at gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53586] New: Internal compiler errors on cp/pt.c:12077 and expr.c:9147 Date: Wed, 06 Jun 2012 05:07:00 -0000 [thread overview] Message-ID: <bug-53586-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53586 Bug #: 53586 Summary: Internal compiler errors on cp/pt.c:12077 and expr.c:9147 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: paulotorrens@gnu.org Trying to compile this small function: template<typename T> auto ptr2bitmap(T *bitmap, int width, int depth = 3) -> typeof(typeof(unsigned char[depth])[width]) *{ return bitmap; }; I got this: Compiling `mjpeg.cpp'... mjpeg.cpp: In substitution of 'template<class T> unsigned char (* ptr2bitmap(T*, int, int))[width][depth] [with T = void]': mjpeg.cpp:223:39: required from here mjpeg.cpp:200:27: internal compiler error: in tsubst_copy, at cp/pt.c:12077 Please submit a full bug report, with preprocessed source if appropriate. See <https://trac.macports.org/newticket> for instructions. make: *** [mjpeg.o] Error 1 And, trying to compile this code: using uc3 = unsigned char[3]; using uc3w = uc3[width]; using uc3wp = uc3w *; auto img = (uc3wp)rgb; int w = 0; for(w = 0; w < font_GMT_width; w++) { for(int y = 0; y < font_height; y++) { ((img[y])[w])[0] = font_pixel(font_GMTX + w, y, 0); ((img[y])[w])[1] = font_pixel(font_GMTX + w, y, 1); ((img[y])[w])[2] = font_pixel(font_GMTX + w, y, 2); }; }; auto add = [&](int start) { for(int x = 0; x < font_char_width; x++, w++) { for(int y = 0; y < font_height; y++) { ((img[y])[w + x])[0] = font_pixel(start + x, y, 0); ((img[y])[w + x])[1] = font_pixel(start + x, y, 1); ((img[y])[w + x])[2] = font_pixel(start + x, y, 2); }; }; }; auto add_colon = [&] { add(font_ColonX); }; auto add_slash = [&] { add(font_SlashX); }; I got this: mjpeg.cpp: In static member function 'static void std::_Function_handler<void(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes ...) [with _Functor = MJPEG::Video::addJpg(void*, size_t, double, tm*) const::<lambda(void*, size_t, size_t)>; _ArgTypes = {void*, long unsigned int, long unsigned int}]': mjpeg.cpp:228:20: internal compiler error: in expand_expr_real_1, at expr.c:9147 Please submit a full bug report, with preprocessed source if appropriate. See <https://trac.macports.org/newticket> for instructions. make: *** [mjpeg.o] Error 1 All tests were run on a Mac OS X Lion machine, and GCC as configured as follow: ../gcc-4.7.0/configure --prefix=/opt/local --build=x86_64-apple-darwin11 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc47 --includedir=/opt/local/include/gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --enable-stage1-checking --disable-multilib --enable-lto --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc47 4.7.0_3'
next reply other threads:[~2012-06-06 5:07 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-06 5:07 paulotorrens at gnu dot org [this message] 2012-06-06 5:58 ` [Bug c++/53586] " pinskia at gcc dot gnu.org 2012-06-06 18:43 ` paulotorrens at gnu dot org 2013-08-09 19:29 ` paolo.carlini at oracle dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-53586-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).