[Bug c/86239] New: Suggestion: Improve "set but not used variable" warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86239 Bug ID: 86239 Summary: Suggestion: Improve "set but not used variable" warning Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pattakosn at yahoo dot com Target Milestone: --- Created attachment 44304 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44304&action=edit compiled with gcc -Wall -Wextra -pedantic Hi, I am not sure if I am right on this, but I noticed that having code like this: useless = 0; useless = useless; silences the set but not used variable warning (assume that useless is a local variable and is not used anywhere else). Now, I would agree that the second line is useless and a terrible thing to do, but still, wouldn't it better if the compiler still complained about the set but not used variable (perhaps about the useless command as well, but I do not know if it would be easy to classify identity/"useless" commands. I attach a very small file that I used to test the compiler warnings.
[Bug fortran/42162] New: Internal compiler error while compiling simple fortran code.
I get this error while trying to compile a simple code which (I think) is valid omp. I tried gfortran 4.3.3 (ubuntu 9.04 amd64 server) 4.4.1 (ubuntu 9.10 amd64) and 4.5.0 20091105 . This is the code that triggered it: PROGRAM ordered IMPLICIT NONE INTEGER :: i !$omp parallel do do i=1,2 write(*,*) 'calling',i call work(i) enddo !$omp end parallel do STOP END PROGRAM ordered subroutine work(k) IMPLICIT NONE INTEGER :: k, OMP_GET_THREAD_NUM !$omp do do k=1,3 write(*,*) OMP_GET_THREAD_NUM(), k enddo !$omp end do return END subroutine work -- Summary: Internal compiler error while compiling simple fortran code. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pattakosn at yahoo dot com GCC host triplet: x86_64-pc-linux-bnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42162
[Bug fortran/42163] New: Internal compiler error while compiling simple fortran code.
I get this error while trying to compile a simple code which (I think) is valid omp. I tried gfortran 4.3.3 (ubuntu 9.04 amd64 server) 4.4.1 (ubuntu 9.10 amd64) and 4.5.0 20091105 . This is the code that triggered it: PROGRAM ordered IMPLICIT NONE INTEGER :: i !$omp parallel do do i=1,2 write(*,*) 'calling',i call work(i) enddo !$omp end parallel do STOP END PROGRAM ordered subroutine work(k) IMPLICIT NONE INTEGER :: k, OMP_GET_THREAD_NUM !$omp do do k=1,3 write(*,*) OMP_GET_THREAD_NUM(), k enddo !$omp end do return END subroutine work -- Summary: Internal compiler error while compiling simple fortran code. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pattakosn at yahoo dot com GCC host triplet: x86_64-pc-linux-bnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42163
[Bug fortran/36465] New: Compilation crashes and asks me to submit a bug report
There is a simulation code that I am trying to make run faster by trying several compile optimization flags. It also uses OpenMP to utilize multiple cores. Today I got this: Driving: /home/nimar/opt/gcc-4.3.0/bin/gfortran -v -save-temps -I/home/nimar/opt/gcc-4.3.0/include -O3 -fimplicit-none -fopenmp -ftree-parallelize-loops=4 -funroll-all-loops -msse4a -march=native -fipa-pta -fipa-cp -funroll-loops -fprefetch-loop-arrays -funit-at-a-time -combine Bed_ini.f -lgfortranbegin -lgfortran -lm -shared-libgcc Using built-in specs. Target: i686-pc-linux-gnu Configured with: /home/nimar/build/gcc-4.3.0/configure --prefix=/home/nimar/opt/gcc-4.3.0 --with-gmp=/home/nimar/opt/gcc-4.3.0 --with-mpfr=/home/nimar/opt/gcc-4.3.0 --enable-languages=c,c++,fortran Thread model: posix gcc version 4.3.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-I/home/nimar/opt/gcc-4.3.0/include' '-O3' '-fimplicit-none' '-fopenmp' '-ftree-parallelize-loops=4' '-funroll-all-loops' '-msse4a' '-fipa-pta' '-fipa-cp' '-funroll-loops' '-fprefetch-loop-arrays' '-funit-at-a-time' '-combine' '-shared-libgcc' '-pthread' /home/nimar/opt/gcc-4.3.0/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951 Bed_ini.f -ffixed-form -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 -mtune=core2 -quiet -dumpbase Bed_ini.f -msse4a -auxbase Bed_ini -O3 -version -fimplicit-none -fopenmp -ftree-parallelize-loops=4 -funroll-all-loops -fipa-pta -fipa-cp -funroll-loops -fprefetch-loop-arrays -funit-at-a-time -I/home/nimar/opt/gcc-4.3.0/include -fintrinsic-modules-path /home/nimar/opt/gcc-4.3.0/lib/gcc/i686-pc-linux-gnu/4.3.0/finclude -o Bed_ini.s GNU F95 (GCC) version 4.3.0 (i686-pc-linux-gnu) compiled by GNU C version 4.3.0, GMP version 4.2.2, MPFR version 2.3.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Bed_ini.f: In function pr9_bed: Bed_ini.f:206: internal compiler error: in get_smt_for, at tree-ssa-alias.c:3203 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. I use a Makefile, but I got the same when trying: /home/nimar/opt/gcc-4.3.0/bin/gfortran -v -save-temps -I/home/nimar/opt/gcc-4.3.0/include -O3 -fimplicit-none -fopenmp -ftree-parallelize-loops=4 -funroll-all-loops -msse4a -march=native -fipa-pta -fipa-cp -funroll-loops -fprefetch-loop-arrays -funit-at-a-time -combine Bed_ini.f I am running ubuntu 8.04, x86 on a core2quad, and I compiled gcc-4.3.0 myself (along with gmp and mpfr). I have never come across sth like that before, so please tell me If I need to submit sth more. I hope these help. -- Summary: Compilation crashes and asks me to submit a bug report Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pattakosn at yahoo dot com GCC build triplet: i686-pc-linux GCC host triplet: i686-pc-linux GCC target triplet: i686-pc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36465
[Bug fortran/36465] Compilation crashes and asks me to submit a bug report
--- Comment #1 from pattakosn at yahoo dot com 2008-06-08 12:05 --- Created an attachment (id=15729) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15729&action=view) The source code and the generated .s file This is the source file that crashes and the .s file that is generated. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36465
[Bug middle-end/36465] Compilation crashes and asks me to submit a bug report
--- Comment #2 from pattakosn at yahoo dot com 2008-06-08 13:49 --- I downloaded and compiled 4.3.1 which seems to work well. However I also downloaded the latest snapshot (4.4-20080606) and I get an other bug : Using built-in specs. Target: i686-pc-linux-gnu Configured with: /home/nimar/build/2/gcc-4.4-20080606/configure --prefix=/home/nimar/opt/gcc-4.4-20080606 --with-gmp=/home/nimar/opt/gcc-4.4-20080606 --with-mpfr=/home/nimar/opt/gcc-4.4-20080606 --enable-languages=c,c++,fortran Thread model: posix gcc version 4.4.0 20080606 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-I/home/nimar/opt/gcc-4.4-20080606/include' '-O3' '-fimplicit-none' '-fopenmp' '-ftree-parallelize-loops=4' '-funroll-all-loops' '-msse4a' '-fipa-pta' '-fipa-cp' '-funroll-loops' '-fprefetch-loop-arrays' '-funit-at-a-time' '-combine' '-c' '-pthread' /home/nimar/opt/gcc-4.4-20080606/libexec/gcc/i686-pc-linux-gnu/4.4.0/f951 main3.f -ffixed-form -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -quiet -dumpbase main3.f -msse4a -auxbase main3 -O3 -version -fimplicit-none -fopenmp -ftree-parallelize-loops=4 -funroll-all-loops -fipa-pta -fipa-cp -funroll-loops -fprefetch-loop-arrays -funit-at-a-time -I/home/nimar/opt/gcc-4.4-20080606/include -fintrinsic-modules-path /home/nimar/opt/gcc-4.4-20080606/lib/gcc/i686-pc-linux-gnu/4.4.0/finclude -o main3.s GNU Fortran (GCC) version 4.4.0 20080606 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.4.0 20080606 (experimental), GMP version 4.2.2, MPFR version 2.3.1. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 main3.f: In function MAIN__.omp_fn.0: main3.f:390: error: stmt (0xb7d02410) marked modified after optimization pass: omp_get_thread_num (); main3.f:390: internal compiler error: verify_ssa failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. compile line was: /home/nimar/opt/gcc-4.4-20080606/bin/gfortran -v -save-temps -I/home/nimar/opt/gcc-4.4-20080606/include -O3 -fimplicit-none -fopenmp -ftree-parallelize-loops=4 -funroll-all-loops -msse4a -march=native -fipa-pta -fipa-cp -funroll-loops -fprefetch-loop-arrays -funit-at-a-time -combine main3.f -c The files i uploaded are no more relevant to this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36465
[Bug middle-end/36465] Compilation crashes and asks me to submit a bug report
--- Comment #3 from pattakosn at yahoo dot com 2008-06-08 14:06 --- Created an attachment (id=15730) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15730&action=view) the file that the latest gfortran (4.4-20080606) fails to compile and the produced .s file This is the file relevant to the second bug -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36465
[Bug middle-end/36465] Compilation crashes and asks me to submit a bug report
--- Comment #4 from pattakosn at yahoo dot com 2008-06-08 14:10 --- (In reply to comment #2) > I downloaded and compiled 4.3.1 which seems to work well. I am sorry, maybe I was not clear. I meant that I downloaded and compiled 4.3.1 and 4.4-20080606 and then gfortran 4.3.1 compiles my source without any failures, and the produced executable seems to run correctly. The new bug regards the latest snapshot which fails to compile my source. The files I submitted first are no longer relevant. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36465