[Bug ada/51035] New: GNAT bug detected error reported when compiling Ada code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51035 Bug #: 51035 Summary: GNAT bug detected error reported when compiling Ada code Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassig...@gcc.gnu.org ReportedBy: aravindvijayan224...@gmail.com Created attachment 25754 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25754 The source code When compiling a test program written in Ada using 4.6.1 20110908 (Red Hat 4.6.1-9) (i686-redhat-linux-gnu) (package gcc-gnat-4.6.1-9.fc15.i686), I see the following error message: [aravind@localhost ada]$ gnatmake test.adb gcc -c test.adb +===GNAT BUG DETECTED==+ | 4.6.1 20110908 (Red Hat 4.6.1-9) (i686-redhat-linux-gnu) Assert_Failure sinfo.adb:2547| | Error detected at test.adb:5:4 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html.| | Use a subject line meaningful to you and us to track the bug.| | Include the entire contents of this bug box in the report. | | Include the exact gcc or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | (concatenated together with no headers between files). | +==+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). test.adb test.adb:5:39: extra ")" ignored compilation abandoned gnatmake: "test.adb" compilation error --- The ada program text consists of the following lines: --begin program with Ada.Text_IO; procedure Test is subtype X is Integer range (1 .. 25); Y: Integer range X'First .. X'Last := X'First; begin Ada.Text_IO.Put("Hello World"); end Test; -- end program The error lies with the line which reads: subtype X is Integer range (1 .. 25); The brackets around the 1 .. 25 are wrong. Once removed, the error goes away. However, the compiler should report a nice error message and not report that a bug in the compiler has been found. -- here is the "gcc -v" output: [aravind@localhost ada]$ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.1/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) -- expected behavior: Just a compiler error due to syntax error actual behavior: A bug box even that is only a syntax error ---
[Bug c/51894] New: Fail to warn on likely precedence error in conditional
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51894 Bug #: 51894 Summary: Fail to warn on likely precedence error in conditional Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: aravindvijayan224...@gmail.com Created attachment 26371 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26371 example program showing the failure to warn example program showing the failure to warn: gcc version 4.7.0 If you have: if (ret = return_neg_one() == 1) printf("direct_test==true\n"); else printf("direct_test==false\n"); The compiler will warn: /tmp/tmp.c:51:2: warning: suggest parentheses around assignment used as truth value But if it is a complex conditional: if (!cond || (ret = return_neg_one() == 1)) The compiler will not warn. It seems it should warn in this case as well.
[Bug fortran/52063] New: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 Bug #: 52063 Summary: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: aravindvijayan224...@gmail.com Created attachment 26526 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26526 Preprocessed Source Description of problem: While building plplot : cd /builddir/build/BUILD/plplot-5.9.9/fedora/examples/f95 && /usr/bin/gfortran -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/builddir/build/BUILD/plplot-5.9.9/fedora/bindings/f95 -I/builddir/build/BUILD/plplot-5.9.9/fedora/examples/f95-c /builddir/build/BUILD/plplot-5.9.9/examples/f95/x09f.f90 -o CMakeFiles/x09f95.dir/x09f.f90.o /builddir/build/BUILD/plplot-5.9.9/examples/f95/x09f.f90:152.22: lev(NLEVEL), t, r, theta, delta 1 Warning: Unused variable 't' declared at (1) /builddir/build/BUILD/plplot-5.9.9/examples/f95/x09f.f90: In function 'x09f95': /builddir/build/BUILD/plplot-5.9.9/examples/f95/x09f.f90:66:0: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
[Bug fortran/52063] internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 --- Comment #1 from Aravind 2012-01-31 03:35:48 UTC --- Created attachment 26527 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26527 plf95demolib.mod
[Bug fortran/52063] internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 --- Comment #2 from Aravind 2012-01-31 03:36:41 UTC --- Created attachment 26528 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26528 plplot.mod
[Bug fortran/52063] internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 --- Comment #3 from Aravind 2012-01-31 03:37:18 UTC --- Compiles fine with 4.6.2-1.fc16
[Bug fortran/52063] internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 --- Comment #4 from Aravind 2012-01-31 03:38:01 UTC --- Narrowed down to: program x09f95 use plf95demolib integer, parameter :: nptsx=35, xdim=99 real(kind=8) :: xg1(xdim), distort xg1 = foo (arange(0,nptsx) / dble(nptsx-1), distort) contains elemental real(kind=8) function foo( coord, factor ) real(kind=8), intent(in) :: coord, factor foo = 1 end function foo end program x09f95
[Bug fortran/52063] internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 --- Comment #5 from Aravind 2012-01-31 03:39:00 UTC --- Created attachment 26529 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26529 plf95demolib.f90
[Bug fortran/52063] internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 --- Comment #6 from Aravind 2012-01-31 03:40:30 UTC --- Created attachment 26530 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26530 the full build log.
[Bug fortran/52063] internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1080
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52063 --- Comment #8 from Aravind 2012-01-31 03:45:10 UTC --- Oh i am sorry