Internal Compiler Error In Expand_expr_real_1 At Expr.c
Search | [?] | Reports | Help | NewAccount | Log In Remember [x] | Forgot Password Login: [x] User account creation filtered due to spam. Bug57892 - g++ internal compiler error: in expand_expr_real_1, at expr.c:9122 while attempting to brace-initialize a dynamically allocated array class member Summary: g++ internal compiler error: in expand_expr_real_1, at expr.c:9122 while atte... Status: RESOLVED FIXED Alias: None Product: gcc Classification: Unclassified Component: c++ (show other bugs) Version: unknown Importance: P3 normal Target Milestone: --- Assignee: Not yet assigned to anyone URL: Keywords: Depends on: Blocks: Reported: 2013-07-13 18:56 UTC by Larry Morell Modified: 2013-07-22 14:06 UTC (History) CC List: 1 user (show) daniel.kruegler See Also: Host: Target: Build: Known to work: 4.8.0, 4.8.1, 4.9.0 Known to fail: Last reconfirmed: Attachments Minimal pgm that illustrates the compiler issue on line 3 (int *a = ...) (110 bytes, text/plain) 2013-07-13 19:00 UTC, Larry Morell Details View All Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description Larry Morell 2013-07-13 18:56:13 UTC Tried to see if a class member's array value can be dynamically allocated and brace initialized. The following error message is generated: error.cc: In copy constructor 'Type::Type(const Type&)': error.cc:3:26: internal compiler error: in expand_expr_real_1, at expr.c:9122 Please submit a full bug report, with preprocessed source if appropriate. Here is the source code: class Type { public: int *a = new int[10]{0}; Type () { } Type(const Type & lt) { } }; int main () { Type lt1; Type lt2 (lt1);; } Removing the {0} eliminates the error. Don't know whether or not the source is syntactically correct, but it certainly should not be giving an internal compiler error. g++ --version gives: g++ (SUSE Linux) 4.7.1 20120723 [gcc-4_7-branch revision 189773]. This is on OpenSuse 12.3, if that is relevant. Comment 1 Larry Morell 2013-07-13 19:00:36 UTC Created attachment 30501 [details] Minimal pgm that illustrates the compiler issue on line 3 (int *a = ...) Comment 2 Daniel Krügler 2013-07-14 15:26:42 UTC This seems to be fixed for gcc 4.9.0 trunk Comment 3 Paolo Carlini 2013-07-22 09:55:07 UTC In fact works with 4.8.0 too. Comment 4 morell 2013-07-22 14:06:45 UTC Thank you! On 07/22/2013 04:55 AM, paolo.carlini at oracle dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57892 > > Pa
Login: [x] User account creation filtered due to spam. Bug42119 - internal compiler error: in expand_expr_addr_expr_1, at expr.c:6862 Summary: internal compiler error: in expand_expr_addr_expr_1, at expr.c:6862 Status: RESOLVED DUPLICATE of bug 38530 Alias: None Product: gcc Classification: Unclassified Component: middle-end (show other bugs) Version: 4.4.1 Importance: P3 normal Target Milestone: --- Assignee: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57892 Not yet assigned to anyone URL: Keywords: ice-on-valid-code Depends on: Blocks: Reported: 2009-11-20 15:12 UTC by nvab Modified: 2009-11-20 18:05 UTC (History) CC List: 2 users (show) gcc-bugs nvab See Also: Host: x86_64-linux-gnu Target: x86_64-linux-gnu Build: x86_64-linux-gnu Known to work: Known to fail: 4.5.0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42119 Last reconfirmed: 2009-11-20 15:33:46 Attachments Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description nvab 2009-11-20 15:12:47 UTC Test file (Test.f90): ------------------------------------- module Test use ISO_C_BINDING contains subroutine Callback(arg) bind(C) integer(C_INT) :: arg end subroutine Callback subroutine Check(proc) type(C_FUNPTR) :: proc end subroutine Check end module Test program Main use Test type(C_FUNPTR) :: proc call Check(C_FUNLOC(Callback)) ! This works fine: ! proc = C_FUNLOC(Callback) ! call Check(proc) end program Main ------------------------------------- Compiler output: ------------------------------------- smile@ubuntu:~/Code$ gfortran -v Test.f90 Driving: gfortran -v Test.f90 -lgfortranbegin -lgfortran -lm -shared-libgcc Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86
! org> Date: 2014-09-29 10:47:15 Message-ID: internal compiler bug-63383-4-bxVGExlqqw () http ! gcc ! gnu ! org/bugzilla/ [Download message RAW] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63383 Richard Biener