Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PowerPC] warning: 'unsigned int __atomic_fetch_add_4(volatile void*, unsigned int, int)' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=] #1999

Open
barracuda156 opened this issue Dec 11, 2023 · 1 comment

Comments

@barracuda156
Copy link

Is this something of a concern (and perhaps could be fixed then)?

In file included from /opt/local/include/gcc13/c++/atomic:41,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/symengine-0.11.2/symengine/basic.h:34,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/symengine-0.11.2/symengine/polys/upolybase.h:8,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/symengine-0.11.2/symengine/polys/uintpoly_flint.h:8,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/symengine-0.11.2/symengine/visitor.h:9:
In member function 'std::__atomic_base<_IntTp>::__int_type std::__atomic_base<_IntTp>::fetch_add(__int_type, std::memory_order) [with _ITp = unsigned int]',
    inlined from 'std::__atomic_base<_IntTp>::__int_type std::__atomic_base<_IntTp>::operator++(int) [with _ITp = unsigned int]' at /opt/local/include/gcc13/c++/bits/atomic_base.h:386:25,
    inlined from 'SymEngine::RCP<T>::RCP(T*) [with T = const SymEngine::Integer]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/symengine-0.11.2/symengine/symengine_rcp.h:113:26,
    inlined from 'SymEngine::RCP<T> SymEngine::rcp_static_cast(const RCP<T1>&) [with T2 = const Integer; T1 = const Basic]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/symengine-0.11.2/symengine/symengine_rcp.h:221:25,
    inlined from 'SymEngine::RCP<const SymEngine::Basic> SymEngine::PolyGamma::rewrite_as_zeta() const' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/symengine-0.11.2/symengine/functions.cpp:3380:69:
/opt/local/include/gcc13/c++/bits/atomic_base.h:635:34: warning: 'unsigned int __atomic_fetch_add_4(volatile void*, unsigned int, int)' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  635 |       { return __atomic_fetch_add(&_M_i, __i, int(__m)); }
      |                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In member function 'SymEngine::RCP<const SymEngine::Basic> SymEngine::PolyGamma::rewrite_as_zeta() const':
cc1plus: note: destination object is likely at address zero
@barracuda156
Copy link
Author

Tests pass though:

--->  Testing symengine
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/build" && /usr/bin/make test DYLD_LIBRARY_PATH=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/build/symengine 
Running tests...
/opt/local/bin/ctest --force-new-ctest-process 
Test project /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_symengine/symengine/work/build
      Start  1: test_rcp
 1/65 Test  #1: test_rcp .........................   Passed    0.18 sec
      Start  2: test_basic
 2/65 Test  #2: test_basic .......................   Passed    0.12 sec
      Start  3: test_arit
 3/65 Test  #3: test_arit ........................   Passed    0.13 sec
      Start  4: test_poly
 4/65 Test  #4: test_poly ........................   Passed    0.09 sec
      Start  5: test_series
 5/65 Test  #5: test_series ......................   Passed    0.09 sec
      Start  6: test_series_generic
 6/65 Test  #6: test_series_generic ..............   Passed    0.36 sec
      Start  7: test_series_expansion_URatF
 7/65 Test  #7: test_series_expansion_URatF ......   Passed    0.12 sec
      Start  8: test_functions
 8/65 Test  #8: test_functions ...................   Passed    0.17 sec
      Start  9: test_subs
 9/65 Test  #9: test_subs ........................   Passed    0.11 sec
      Start 10: test_integer
10/65 Test #10: test_integer .....................   Passed    0.10 sec
      Start 11: test_rational
11/65 Test #11: test_rational ....................   Passed    0.10 sec
      Start 12: test_relationals
12/65 Test #12: test_relationals .................   Passed    0.10 sec
      Start 13: test_number
13/65 Test #13: test_number ......................   Passed    0.10 sec
      Start 14: test_as_numer_denom
14/65 Test #14: test_as_numer_denom ..............   Passed    0.10 sec
      Start 15: test_parser
15/65 Test #15: test_parser ......................   Passed    0.14 sec
      Start 16: test_serialize-cereal
16/65 Test #16: test_serialize-cereal ............   Passed    0.09 sec
      Start 17: test_sbml_parser
17/65 Test #17: test_sbml_parser .................   Passed    0.14 sec
      Start 18: test_sets
18/65 Test #18: test_sets ........................   Passed    0.12 sec
      Start 19: test_fields
19/65 Test #19: test_fields ......................   Passed    0.29 sec
      Start 20: test_infinity
20/65 Test #20: test_infinity ....................   Passed    0.11 sec
      Start 21: test_nan
21/65 Test #21: test_nan .........................   Passed    0.09 sec
      Start 22: test_solve
22/65 Test #22: test_solve .......................   Passed    0.16 sec
      Start 23: test_as_real_imag
23/65 Test #23: test_as_real_imag ................   Passed    0.13 sec
      Start 24: test_cse
24/65 Test #24: test_cse .........................   Passed    0.10 sec
      Start 25: test_count_ops
25/65 Test #25: test_count_ops ...................   Passed    0.09 sec
      Start 26: test_test_visitors
26/65 Test #26: test_test_visitors ...............   Passed    0.11 sec
      Start 27: test_assumptions
27/65 Test #27: test_assumptions .................   Passed    0.10 sec
      Start 28: test_refine
28/65 Test #28: test_refine ......................   Passed    0.09 sec
      Start 29: test_simplify
29/65 Test #29: test_simplify ....................   Passed    0.09 sec
      Start 30: test_tuple
30/65 Test #30: test_tuple .......................   Passed    0.09 sec
      Start 31: test_tribool
31/65 Test #31: test_tribool .....................   Passed    0.09 sec
      Start 32: test_ntheory
32/65 Test #32: test_ntheory .....................   Passed    0.33 sec
      Start 33: test_diophantine
33/65 Test #33: test_diophantine .................   Passed    0.09 sec
      Start 34: test_ntheory_funcs
34/65 Test #34: test_ntheory_funcs ...............   Passed    0.23 sec
      Start 35: test_matrix
35/65 Test #35: test_matrix ......................   Passed    0.13 sec
      Start 36: test_matrixexpr
36/65 Test #36: test_matrixexpr ..................   Passed    0.11 sec
      Start 37: test_printing
37/65 Test #37: test_printing ....................   Passed    0.10 sec
      Start 38: test_ccode
38/65 Test #38: test_ccode .......................   Passed    0.09 sec
      Start 39: test_uintpoly
39/65 Test #39: test_uintpoly ....................   Passed    0.10 sec
      Start 40: test_uratpoly
40/65 Test #40: test_uratpoly ....................   Passed    0.10 sec
      Start 41: test_mintpoly
41/65 Test #41: test_mintpoly ....................   Passed    0.09 sec
      Start 42: test_uexprpoly
42/65 Test #42: test_uexprpoly ...................   Passed    0.09 sec
      Start 43: test_mexprpoly
43/65 Test #43: test_mexprpoly ...................   Passed    0.09 sec
      Start 44: test_basic_conversions
44/65 Test #44: test_basic_conversions ...........   Passed    0.11 sec
      Start 45: test_uintpoly_flint
45/65 Test #45: test_uintpoly_flint ..............   Passed    0.09 sec
      Start 46: test_uratpoly_flint
46/65 Test #46: test_uratpoly_flint ..............   Passed    0.09 sec
      Start 47: test_cancel
47/65 Test #47: test_cancel ......................   Passed    0.09 sec
      Start 48: test_eval_mpfr
48/65 Test #48: test_eval_mpfr ...................   Passed    0.09 sec
      Start 49: test_eval_mpc
49/65 Test #49: test_eval_mpc ....................   Passed    0.09 sec
      Start 50: test_evalf
50/65 Test #50: test_evalf .......................   Passed    0.08 sec
      Start 51: test_eval_double
51/65 Test #51: test_eval_double .................   Passed    0.10 sec
      Start 52: test_lambda_double
52/65 Test #52: test_lambda_double ...............   Passed    0.10 sec
      Start 53: test_cwrapper
53/65 Test #53: test_cwrapper ....................   Passed    0.09 sec
      Start 54: test_expression
54/65 Test #54: test_expression ..................   Passed    0.08 sec
      Start 55: test_logic
55/65 Test #55: test_logic .......................   Passed    0.09 sec
      Start 56: test_finitediff
56/65 Test #56: test_finitediff ..................   Passed    0.08 sec
      Start 57: test_bipartite
57/65 Test #57: test_bipartite ...................   Passed    0.07 sec
      Start 58: test_hopcroft_karp
58/65 Test #58: test_hopcroft_karp ...............   Passed    0.08 sec
      Start 59: test_case001
59/65 Test #59: test_case001 .....................   Passed    0.08 sec
      Start 60: test_case002
60/65 Test #60: test_case002 .....................   Passed    0.08 sec
      Start 61: test_case003
61/65 Test #61: test_case003 .....................   Passed    0.08 sec
      Start 62: test_case004
62/65 Test #62: test_case004 .....................   Passed    0.08 sec
      Start 63: test_case005
63/65 Test #63: test_case005 .....................   Passed    0.08 sec
      Start 64: test_case006
64/65 Test #64: test_case006 .....................   Passed    0.08 sec
      Start 65: test_case007
65/65 Test #65: test_case007 .....................   Passed    0.08 sec

100% tests passed, 0 tests failed out of 65

Total Test time (real) =   7.41 sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant