[Bug bootstrap/79052] bootstrap-ubsan failures due to warnings

2017-01-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79052

--- Comment #4 from Martin Sebor  ---
Here's a complete set of warnings from a bootstrap configured with
--with-build-config=bootstrap-ubsan and --disable-werror.  I think GCC builds
libraries without -Werror so those are probably not causing any trouble.  I
don't know what else it builds without it.  Those might be worth reviewing. 
I'll try to look into the -Wformat-{truncation,overflow}, -Wnonnull, and
-Walloc-size-larger-than instances when I have a chance.

DiagnosticCount   UniqueFiles
-Wmaybe-uninitialized   327   82   41
-Wimplicit-fallthrough=  58   114
-Wunused-parameter   2032
-Wimplicit-function-declaration  1852
-Wformat-truncation= 1453
-Wunused-but-set-variable1232
-Wnonnull1242
-Wformat-overflow=844
-Wsign-compare633
-Wcpp 411
-Wstringop-overflow=  211
-Walloc-size-larger-than= 211

-Walloc-size-larger-than Instances: 
  gcc/../include/libiberty.h:356

-Wcpp Instances: 
  /usr/include/features.h:148

-Wformat-overflow Instances: 
  gcc/ada/env.c:193
  gcc/c/c-typeck.c:7022
  gcc/c-family/c-cppbuiltin.c:848
  gcc/stmt.c:670

-Wformat-truncation Instances: 
  libgfortran/intrinsics/date_and_time.c:165
  libgfortran/intrinsics/date_and_time.c:168
  libgfortran/intrinsics/date_and_time.c:172
  libiberty/simple-object-coff.c:571
  libiberty/simple-object-xcoff.c:655

-Wimplicit-fallthrough Instances: 
  gengtype-lex.c:365
  libgcc/soft-fp/op-common.h:900
  libgcc/soft-fp/op-common.h:913
  libgcc/soft-fp/soft-fp.h:213
  libgfortran/io/list_read.c:1032
  libgfortran/io/list_read.c:1400
  libgfortran/io/list_read.c:1523
  libgfortran/io/list_read.c:1645
  libgfortran/io/list_read.c:1704
  libgfortran/io/list_read.c:851
  libgfortran/io/list_read.c:974

-Wimplicit-function-declaration Instances: 
  libmpx/mpxrt/mpxrt.c:255
  socket.c:127
  socket.c:137
  socket.c:147
  socket.c:155

-Wmaybe-uninitialized Instances: 
  g-comlin.adb:583
  g-debpoo.adb:1418
  gcc/ada/atree.adb:2568
  gcc/ada/checks.adb:8117
  gcc/ada/checks.adb:8326
  gcc/ada/checks.adb:8414
  gcc/ada/exp_attr.adb:1342
  gcc/ada/exp_attr.adb:1413
  gcc/ada/exp_ch4.adb:4026
  gcc/ada/exp_ch7.adb:8289
  gcc/ada/exp_ch7.adb:8686
  gcc/ada/exp_ch7.adb:8866
  gcc/ada/exp_ch9.adb:3292
  gcc/ada/exp_ch9.adb:6147
  gcc/ada/exp_ch9.adb:9955
  gcc/ada/exp_disp.adb:1060
  gcc/ada/exp_disp.adb:1561
  gcc/ada/exp_disp.adb:1577
  gcc/ada/exp_disp.adb:1687
  gcc/ada/exp_disp.adb:5186
  gcc/ada/exp_dist.adb:10036
  gcc/ada/exp_dist.adb:1533
  gcc/ada/exp_dist.adb:1538
  gcc/ada/exp_dist.adb:1555
  gcc/ada/exp_dist.adb:1574
  gcc/ada/freeze.adb:1177
  gcc/ada/inline.adb:3471
  gcc/ada/par-ch3.adb:3854
  gcc/ada/par-ch9.adb:125
  gcc/ada/par-ch9.adb:471
  gcc/ada/put_spark_xrefs.adb:167
  gcc/ada/put_spark_xrefs.adb:174
  gcc/ada/sem.adb:760
  gcc/ada/sem_aggr.adb:4651
  gcc/ada/sem_case.adb:488
  gcc/ada/sem_ch12.adb:13652
  gcc/ada/sem_ch12.adb:4678
  gcc/ada/sem_ch12.adb:5692
  gcc/ada/sem_ch13.adb:13421
  gcc/ada/sem_ch13.adb:13450
  gcc/ada/sem_ch13.adb:1842
  gcc/ada/sem_ch13.adb:6674
  gcc/ada/sem_ch3.adb:6515
  gcc/ada/sem_ch4.adb:1070
  gcc/ada/sem_ch4.adb:1489
  gcc/ada/sem_ch4.adb:400
  gcc/ada/sem_ch4.adb:8937
  gcc/ada/sem_ch5.adb:1446
  gcc/ada/sem_ch5.adb:2174
  gcc/ada/sem_ch6.adb:1140
  gcc/ada/sem_ch6.adb:445
  gcc/ada/sem_ch9.adb:3527
  gcc/ada/sem_ch9.adb:651
  gcc/ada/sem_ch9.adb:692
  gcc/ada/sem_ch9.adb:835
  gcc/ada/sem_disp.adb:772
  gcc/ada/sem_eval.adb:2334
  gcc/ada/sem_eval.adb:6699
  gcc/ada/sem_intr.adb:170
  gcc/ada/sem_prag.adb:10786
  gcc/ada/sem_prag.adb:27743
  gcc/ada/sem_prag.adb:5671
  gcc/ada/sem_res.adb:1520
  gcc/ada/sem_res.adb:4679
  gcc/ada/sem_util.adb:15639
  gcc/ada/sem_util.adb:15640
  gcc/ada/sem_util.adb:2814
  gcc/ada/sem_util.adb:9838
  gcc/ada/xref_lib.adb:1039
  gcc/ada/xref_lib.adb:1143
  gcc/ada/xref_lib.adb:770
  gcc/ada/xr_tabls.adb:1015
  gcc/ada/xr_tabls.adb:1065
  gcc/fortran/error.c:1084
  libsanitizer/asan/asan_interceptors.cc:57
  libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:2746
  libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:2795
  libsanitizer/sanitizer_common/sanitizer_posix.cc:213
  libsanitizer/tsan/tsan_interceptors.cc:2185
  libsanitizer/ubsan/ubsan_handlers_cxx.cc:109
  s-stoele.adb:82
  s-stusta.adb:228

-Wnonnull Instances: 
  adaint.c:2837
  adaint.c:2839
  gcc/ada/adaint.c:2837
  gcc/ada/adaint.c:2839

-Wsign-compare Instances: 
  gcc/config/i386/i386.c:12415
  gcc/dwarf2out.c:2060
  gcc/varasm.c:2703

-Wstringop-overflow Instances: 
  gcc/ada/adaint.c:3405

-Wunused-but-set-variable 

[Bug bootstrap/79052] bootstrap-ubsan failures due to warnings

2017-01-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79052

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Wed Jan 11 11:26:59 2017
New Revision: 244310

URL: https://gcc.gnu.org/viewcvs?rev=244310=gcc=rev
Log:
2017-01-11  Richard Biener  

PR bootstrap/79052
* gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
returns on parse errors.

Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/gimple-parser.c


[Bug bootstrap/79052] bootstrap-ubsan failures due to warnings

2017-01-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79052

--- Comment #2 from Richard Biener  ---
I'll take care of the gimple-parser.c part.

[Bug bootstrap/79052] bootstrap-ubsan failures due to warnings

2017-01-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79052

Martin Sebor  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=78608,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=69412,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=64920,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=64914

--- Comment #1 from Martin Sebor  ---
See also bug 78608, bug 69412, bug 64920, and bug 64914 for other
bootstrap-ubsan problems.